MDL-39801 navigation_node::remove fails if first child does not have a key

This commit is contained in:
Marina Glancy
2013-06-04 02:03:24 +02:00
committed by Eloy Lafuente (stronk7)
parent 4746dc557a
commit d60d1d0db8
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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;
}