MDL-84438 task: Ignore tasks which don't have valid classes

This commit is contained in:
Brendan Heywood
2025-02-06 09:25:38 +11:00
parent 07881a5772
commit f016dc2302
+6 -4
View File
@@ -646,15 +646,17 @@ class manager {
foreach ($records as $record) {
$task = self::scheduled_task_from_record($record);
// Safety check in case the task in the DB does not match a real class (maybe something was uninstalled).
if (!$task) {
continue;
}
// Tasks belonging to deprecated plugin types are excluded.
if (self::task_component_is_deprecated($task)) {
continue;
}
// Safety check in case the task in the DB does not match a real class (maybe something was uninstalled).
if ($task) {
$tasks[] = $task;
}
$tasks[] = $task;
}
return $tasks;