Skip to content

Abort process check on manual course deletion fails #294

@Menrath

Description

@Menrath

Manually deleting a course which is already part of a tool_lifecycle process leads to a fatal error.

PHP 8.3
Moodle 4.5+
tool_lifecycle v5.0-r3

Fehler: Call to a member function abort_course() on null
Debug info: 
Error code: generalexceptionmessage
Stack trace: 
	• line 338 of /admin/tool/lifecycle/classes/local/manager/process_manager.php: Error thrown
	• line 325 of /admin/tool/lifecycle/classes/local/manager/process_manager.php: call to tool_lifecycle\local\manager\process_manager::abort_process()
	• line ? of unknownfile: call to tool_lifecycle\local\manager\process_manager::course_deletion_observed()
	• line 155 of /lib/classes/event/manager.php: call to call_user_func()
	• line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
	• line 795 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
	• line 4741 of /lib/moodlelib.php: call to core\event\base->trigger()
	• line 78 of /course/delete.php: call to delete_course()

public static function abort_process($process) {
has quite a few missing checks whether the return value is null. But I cannot tell what the desired behaviour in such cases should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions