Skip to content

Commit

Permalink
MDL-74358 availability: Avoid php8 problem with array_values(null)
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jun 17, 2022
1 parent 8303206 commit 78cbd77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion availability/classes/tree.php
Expand Up @@ -684,7 +684,7 @@ public function update_after_restore($restoreid, $courseid,
} 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;
}
}
Expand Down

0 comments on commit 78cbd77

Please sign in to comment.