From 6f3f7b63655a112e0b282d62ff3484fc609649b6 Mon Sep 17 00:00:00 2001 From: SofianeLasri <alasri250@gmail.com> Date: Fri, 14 Jan 2022 17:20:49 +0100 Subject: [PATCH] array? --- core/classes/Shop.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/classes/Shop.php b/core/classes/Shop.php index 5e82f852..fad5b715 100644 --- a/core/classes/Shop.php +++ b/core/classes/Shop.php @@ -16,12 +16,12 @@ public static function getAllProducts(){ foreach($items as $item){ $itemAleadyEntered = false; foreach($return as $checkItem){ - if($item->item->type == $checkItem->getId()){ + if($item['item']['type'] == $checkItem->getId()){ $itemAleadyEntered = true; } } if(!$itemAleadyEntered){ - $return[] = new Item($item->item->type); + $return[] = new Item($item['item']['type']); } } return $return; -- GitLab