Skip to content
Snippets Groups Projects
Commit 6f3f7b63 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

array?

parent b44285b8
No related branches found
No related tags found
No related merge requests found
...@@ -16,12 +16,12 @@ public static function getAllProducts(){ ...@@ -16,12 +16,12 @@ public static function getAllProducts(){
foreach($items as $item){ foreach($items as $item){
$itemAleadyEntered = false; $itemAleadyEntered = false;
foreach($return as $checkItem){ foreach($return as $checkItem){
if($item->item->type == $checkItem->getId()){ if($item['item']['type'] == $checkItem->getId()){
$itemAleadyEntered = true; $itemAleadyEntered = true;
} }
} }
if(!$itemAleadyEntered){ if(!$itemAleadyEntered){
$return[] = new Item($item->item->type); $return[] = new Item($item['item']['type']);
} }
} }
return $return; return $return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment