From 457fd7481119c6687ce7496814d9a274b00d8460 Mon Sep 17 00:00:00 2001 From: SofianeLasri <alasri250@gmail.com> Date: Sat, 15 Jan 2022 15:45:12 +0100 Subject: [PATCH] strtolower --- core/classes/Item.php | 2 +- core/classes/Shop.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/classes/Item.php b/core/classes/Item.php index 6294a5a4..85054d6e 100644 --- a/core/classes/Item.php +++ b/core/classes/Item.php @@ -10,7 +10,7 @@ class Item{ public function __construct($item){ if(is_array($item)){ - $this->id = $item['type']; + $this->id = strtolower($item['type']); if(isset($item['meta'])){ if(isset($item['meta']['display-name'])){ diff --git a/core/classes/Shop.php b/core/classes/Shop.php index ebbcffd9..67fca873 100644 --- a/core/classes/Shop.php +++ b/core/classes/Shop.php @@ -34,7 +34,7 @@ public static function getShops($search=null){ $shops = Connexion::pdo()->query("SELECT * FROM qs_external_cache NATURAL JOIN qs_shops")->fetchAll(PDO::FETCH_ASSOC); for($i=0;$i<count($shops);$i++){ $item = yaml_parse($shops[$i]['itemConfig']); - $shops[$i]['item'] = new Item(strtolower($item['item'])); + $shops[$i]['item'] = new Item($item['item']); $owner = json_decode($shops[$i]['owner'], true); $shops[$i]['seller'] = new Seller($owner["owner"]); } -- GitLab