Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5893

Restore fails in Moodle 2.9

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.9.1
    • None
    • None
    • MOODLE_29_STABLE

      1. Create a course with three or more sections and at least one activity per section
      2. Backup this course with or without userdata
      3. Restore the backup as new course
        The backup will fail with the message:
        Fatal error: Cannot use object of type stdClass as array in W:\www\moodle29\course\format\grid\lib.php on line 886

      The method update_course_format_options() the error comes uses an object as array.
      The method is inherited from "format_base". There the parameter $data is defined as stdClass or array.

      To solve this I put the following line in the file "course/format/grid/lib.php" at line 782:
      $data = (array)$data;

      It would be great if this or another solution goes into the code.

      Best regards
      Andreas

            gb2048 Gareth J Barnard
            grabs Andreas Grabs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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