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

This commit is contained in:
Eloy Lafuente (stronk7)
2022-06-17 11:09:53 +02:00
parent 8303206ae0
commit 78cbd77c0d
+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;
}
}