Skip to content

Commit

Permalink
lifecycletrigger_categories: Don't fail if category doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
justusdieckmann committed Feb 21, 2024
1 parent 433ee39 commit 944a06e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trigger/categories/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function get_course_recordset_where($triggerid) {
$allcategories = [];
foreach ($categories as $category) {
array_push($allcategories, $category);
if (!isset($categoryobjects[$category])) {
continue;
}
$children = $categoryobjects[$category]->get_all_children_ids();
$allcategories = array_merge($allcategories, $children);
}
Expand Down

0 comments on commit 944a06e

Please sign in to comment.