I have the following if condition:
if (
$items[ $count + 1 ]->menu_item_parent != $parent_id &&
$submenu &&
$items[ $count + 1 ]->menu_item_parent != $item->ID) {
//something
}
I get the notice:
Undefined offset: 13
So I assume the 13 does not exist in the $items array and it can be avoided by checking with in_array. However I'm unsure how I can use that function in the above condition.