Moodle
  1. Moodle
  2. MDL-24841

files/index.php should have require_once's

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.10
    • Fix Version/s: None
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      The file files/index.php has require rather than require_once statements.

        Gliffy Diagrams

          Activity

          Hide
          Sam Marshall added a comment -

          Note: This does not affect actual operation in current Moodle but it is still a bug and a trivial one, so I thought it would make sense to fix it.

          It causes problems in our code because we load extra libraries, causing the library in question to be required multiple times.

          The current idiom in Moodle appears to be to 'require' config.php but 'require_once' all libraries so I have changed it to that.

          Moodle 2 is not affected by this change as file.php does not do these requires.

          Show
          Sam Marshall added a comment - Note: This does not affect actual operation in current Moodle but it is still a bug and a trivial one, so I thought it would make sense to fix it. It causes problems in our code because we load extra libraries, causing the library in question to be required multiple times. The current idiom in Moodle appears to be to 'require' config.php but 'require_once' all libraries so I have changed it to that. Moodle 2 is not affected by this change as file.php does not do these requires.
          Hide
          Sam Marshall added a comment -

          note: tagged as MOODLE_19_MERGED (although as noted there was no change to HEAD)

          Show
          Sam Marshall added a comment - note: tagged as MOODLE_19_MERGED (although as noted there was no change to HEAD)

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: