-
Bug
-
Resolution: Fixed
-
Critical
-
2.8.5
-
MOODLE_28_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
wip-
MDL-49572-master -
In Moodle 2.8.5 or earlier:
- Create a category
- Create at least one course in the category
- Go to 'Manage courses and categories' and select that category
- Select a sort order from the 'Sort courses' dropdown
- Delete the course
When you return to the category management page, it displays the following error:
Notice: Undefined offset: 1034 in /var/moodle/moodle/lib/coursecatlib.php on line 1405
|
Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
|
|
Debug info: Argument 1 passed to course_in_list::__construct() must be an instance of stdClass, null given, called in [dirroot]/lib/coursecatlib.php on line 1405 and defined
|
Error code: codingerror
|
|
Stack trace:
|
line 393 of /lib/setuplib.php: coding_exception thrown
|
line 2672 of /lib/coursecatlib.php: call to default_error_handler()
|
line 1405 of /lib/coursecatlib.php: call to course_in_list->__construct()
|
line 524 of /course/classes/management_renderer.php: call to coursecat->get_courses()
|
line 498 of /course/management.php: call to core_course_management_renderer->course_listing()
|
This looks to be closely related to MDL-42509, but is still persisting in the most recent versions of Moodle. The error message disappears if you wait a while, or if you go to a different part of the site (e.g. homepage) and then return to the category management page--thus it probably is a cache issue.