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

Error in /lib/filelib.php, missing object case

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.9.17
    • Course, Libraries, SCORM
    • None
    • MOODLE_39_STABLE

      Hello,

      On a 3.9 platform, we've got an error after a migration when loading a scorm page from a singleactivity course format. The error was "Object of class stored_file could not be converted to string".

      Following this, we could find at the line 2307 from /lib/filelib.php that "$buffercontents = ob_get_clean();" return a single space instead of a null value, issuing to enter the condition next line. The "$file" from the error log L.2309 here is then an object that generate the error we encounter.

      At line 2318 of the same file you check if $file is an object. This check should probably be done before the error log instead of after.

      Sincerely

            Unassigned Unassigned
            qc.edunao Quentin
            Votes:
            0 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.