-
Bug
-
Resolution: Fixed
-
Minor
-
5.0
-
MOODLE_500_STABLE
-
MOODLE_500_STABLE
-
MDL-84438-regress-task -
-
-
Just ran into a regression with this. If you have a scheduled task from a plugin which is uninstalled everything cron related both cli and web explodes because scheduled_task_from_record() can return false and task_component_is_deprecated() needs a task object:
php admin/cli/scheduled_task.php --list
== List of scheduled tasks (https://master.localhost) ==
!!! Exception - core\task\manager::task_component_is_deprecated(): Argument #1 ($task) must be of type core\task\task_base, false given, called in [dirroot]/lib/classes/task/manager.php on line 650 !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 1009 of /lib/classes/task/manager.php: TypeError thrown
- line 650 of /lib/classes/task/manager.php: call to core\task\manager::task_component_is_deprecated()
- line 89 of /admin/cli/scheduled_task.php: call to core\task\manager::get_all_scheduled_tasks()
!!