From 33817e5ab1d22cafaef8b2f578847e80c57ccd5f Mon Sep 17 00:00:00 2001 From: slawkens Date: Wed, 31 Aug 2022 18:43:42 +0200 Subject: [PATCH] Fix undefined notice Ahh @gpedro ;) --- system/libs/CreateCharacter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libs/CreateCharacter.php b/system/libs/CreateCharacter.php index 2f1c227c..87815753 100644 --- a/system/libs/CreateCharacter.php +++ b/system/libs/CreateCharacter.php @@ -254,8 +254,8 @@ class CreateCharacter $loaded_items_to_copy = $db->query("SELECT * FROM player_items WHERE player_id = ".$char_to_copy->getId().""); foreach($loaded_items_to_copy as $save_item) { - $blob = addslashes($save_item['attribute']); - $db->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '{$blob}');"); + $blob = $db->quote($save_item['attributes']); + $db->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', $blob);"); } global $twig;