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

Fix places using compact() with undefined variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.3, 3.7
    • Fix Version/s: 3.6.4
    • Component/s: Course, General, SCORM
    • Labels:
    • Testing Instructions:
      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).
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Peer reviewer:
            Dan Marsden
            Integrator:
            Jun Pataleta
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/19

                Time Tracking

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