diff --git a/lib/classes/navigation/views/secondary.php b/lib/classes/navigation/views/secondary.php index 385c5d6755d..13ecdce8aec 100644 --- a/lib/classes/navigation/views/secondary.php +++ b/lib/classes/navigation/views/secondary.php @@ -417,7 +417,7 @@ class secondary extends view { if ($courseadminnode) { foreach ($courseadminnode->children as $other) { - if (array_search($other->key, $expectedcourseadmin) === false) { + if (array_search($other->key, $expectedcourseadmin, true) === false) { $othernode = $this->get_first_action_for_node($other); $recursivenode = $othernode && !$rootnode->get($othernode->key) ? $othernode : $other; // Get the first node and check whether it's been added already.