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

$CFG is not available from plugins install.php during behat installation

    XMLWordPrintable

    Details

      Description

      If a plugin uses the core function "download_file_content", and is installed with a the 3.2 (Build 20161115) or later, it can fail. This is because that function now directly accesses $CFG->$curlsecurityallowedport. That variable is new with 3.2 (Build 20161115), and doesn't exist until the settings page for "HTTP Security" is saved. For a command line install like Travis, this settings page may not have been saved yet, and thus the install fails with an "undefined property" error.
      I believe this could only happen with command line or automated installers, as it is difficult to avoid the settings save screen with an interactive install.
      To prevent this, the variables existence should be checked before it as accessed.

      This is a bug caused by MDL-48498

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              mchurch Mike Churchward
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Andrew Nicols
              Tester:
              John Okely
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16