mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-74407 navigation: Perform a strict array_search for node keys
Perform strict array_search due to conflicting results in versions <php8.0
This commit is contained in:
parent
5423e5f443
commit
40ad488405
1 changed files with 1 additions and 1 deletions
|
@ -417,7 +417,7 @@ class secondary extends view {
|
||||||
|
|
||||||
if ($courseadminnode) {
|
if ($courseadminnode) {
|
||||||
foreach ($courseadminnode->children as $other) {
|
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);
|
$othernode = $this->get_first_action_for_node($other);
|
||||||
$recursivenode = $othernode && !$rootnode->get($othernode->key) ? $othernode : $other;
|
$recursivenode = $othernode && !$rootnode->get($othernode->key) ? $othernode : $other;
|
||||||
// Get the first node and check whether it's been added already.
|
// Get the first node and check whether it's been added already.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue