We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1466ac commit afbaadaCopy full SHA for afbaada
src/Menu/Items/ItemList.php
@@ -459,8 +459,10 @@ public function getAllItemListsIncludingThisOne()
459
public function getItemListsAtDepth($depth)
460
{
461
$itemListsWithDepth = $this->getItemListsWithDepth();
462
-
463
- return new MenuHandler($itemListsWithDepth[$depth]);
+ if (array_key_exists($depth, $itemListsWithDepth)) {
+ return new MenuHandler($itemListsWithDepth[$depth]);
464
+ }
465
+ return new MenuHandler(array());
466
}
467
468
/**
0 commit comments