MDL-39801 navigation_node::remove fails if first child does not have a key
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
4746dc557a
commit
d60d1d0db8
@@ -899,7 +899,7 @@ class navigation_node_collection implements IteratorAggregate {
|
||||
$child = $this->get($key, $type);
|
||||
if ($child !== false) {
|
||||
foreach ($this->collection as $colkey => $node) {
|
||||
if ($node->key == $key && $node->type == $type) {
|
||||
if ($node->key === $key && $node->type == $type) {
|
||||
unset($this->collection[$colkey]);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user