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

This commit is contained in:
Eloy Lafuente (stronk7)
2022-06-17 11:09:46 +02:00
parent b81fb00f25
commit ed0913d45b
+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;
}
}