In some cases duplicate_cm_to_course can return null, but function declares it will return int. That blows up ad hoc task it falis.
b9e118f95c2f:886 2023-09-16 22:14:23 Adhoc task failed: block_massaction\task\duplicate_task,Return value of block_massaction\massactionutils::duplicate_cm_to_course() must be of the type int, null returned
b9e118f95c2f:886 2023-09-16 22:14:23 Backtrace:
b9e118f95c2f:886 2023-09-16 22:14:23 * line 266 of /blocks/massaction/classes/actions.php: call to block_massaction\massactionutils::duplicate_cm_to_course()
b9e118f95c2f:886 2023-09-16 22:14:23 * line 61 of /blocks/massaction/classes/task/duplicate_task.php: call to block_massaction\actions::duplicate_to_course()
b9e118f95c2f:886 2023-09-16 22:14:23 * line 413 of /lib/cronlib.php: call to block_massaction\task\duplicate_task->execute()
b9e118f95c2f:886 2023-09-16 22:14:23 * line 206 of /lib/cronlib.php: call to cron_run_inner_adhoc_task()
b9e118f95c2f:886 2023-09-16 22:14:23 * line 175 of /admin/cli/adhoc_task.php: call to cron_run_adhoc_tasks()
In some cases duplicate_cm_to_course can return null, but function declares it will return int. That blows up ad hoc task it falis.