MDL-74358 availability: Avoid php8 problem with array_values(null)

This commit is contained in:
Eloy Lafuente (stronk7)
2022-06-17 11:09:48 +02:00
parent 14d4bfdd2a
commit feb621d4de
+1 -1
View File
@@ -684,7 +684,7 @@ class tree extends tree_node {
} else {
unset($this->children[$index]);
unset($this->showchildren[$index]);
$this->showchildren = array_values($this->showchildren);
$this->showchildren = !is_null($this->showchildren) ? array_values($this->showchildren) : null;
$changed = true;
}
}