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

Fix places using compact() with undefined variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.6.4
    • 3.6.3, 3.7
    • Course, General, SCORM
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_36_STABLE
    • Hide

      Using PHP 7.3, and with debugging and display errors enabled (or alternatively looking to web server logs).

      Course requests:

      1. Enable course requests in admin and visit course/request.php
      2. Verify that no PHP notice is shown (in page or web server logs, e.g. "tail -f /var/log/apache2/error.log").
      3. Verify that your editor preferences are observed (if you're using Atto, Atto is shown, if you are using plain text, plain text is shown).

      SCORM:

      1. Create a SCORM activity and go to the reports tab (You may use the RuntimeBasicCalls_SCORM20043rdEdition.zip package).
      2. Click on the "interactions" report.
      3. Verify that no PHP notice is shown (in page or web server logs).
      4. Click on the "objectives" report.
      5. Verify that no PHP notice is shown (in page or web server logs).
      Show
      Using PHP 7.3, and with debugging and display errors enabled (or alternatively looking to web server logs). Course requests: Enable course requests in admin and visit course/request.php Verify that no PHP notice is shown (in page or web server logs, e.g. " tail -f /var/log/apache2/error.log "). Verify that your editor preferences are observed (if you're using Atto, Atto is shown, if you are using plain text, plain text is shown). SCORM: Create a SCORM activity and go to the reports tab (You may use the RuntimeBasicCalls_SCORM20043rdEdition.zip package). Click on the "interactions" report. Verify that no PHP notice is shown (in page or web server logs). Click on the "objectives" report. Verify that no PHP notice is shown (in page or web server logs).

      Since PHP 7.3 compact() emits a warning when using undefined variables:

      https://3v4l.org/j1tWO

      This is about to review core and fix all the detected incorrect uses.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Dan Marsden Dan Marsden
            Jun Pataleta Jun Pataleta
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m

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