Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43034

PHP catchable fatal error when deleting a course and displaying 'Category and courses'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.6
    • Administration, Caching
    • MOODLE_26_STABLE

      To reproduce in Moodle 2.6 latest weekly build:

      • Fresh Moodle Install
      • with course creation tool create two "M" sized courses in the "Miscellaneous" category
      • from the 'Course and category management' page delete 1 course
      • going back to the course 'Course and category management' with Course and category visible, the following errors appears:

      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 1433 and defined
      Error code: codingerror

      Stack trace:

      line 393 of /lib/setuplib.php: coding_exception thrown
      line 2644 of /lib/coursecatlib.php: call to default_error_handler()
      line 1433 of /lib/coursecatlib.php: call to course_in_list->__construct()
      line 517 of /course/classes/management_renderer.php: call to coursecat->get_courses()
      line 497 of /course/management.php: call to core_course_management_renderer->course_listing()

      The error is most probably related to caching as we noticed after course deletion of one of two courses the category 'Miscellaneous' was still showing 2 courses inside itself.

      Please note the error has been reproduced with default Moodle cache store (i.e. no memcache or other store used).

            Unassigned Unassigned
            andreabix Andrea Bicciolo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.