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

admin/tool/phpunit/cli/init.php using relative include

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Unit tests
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      Whilst looking at MDL-32443 I noticed that admin/tool/phpunit/cli/init.php is using a relative include using _DIR_.

      The coding style doc says: "Our CLI script must not use relative config.php paths."

      Looks like you added this Petr: http://docs.moodle.org/dev/index.php?title=Coding_style&diff=28599&oldid=28598

      So this is just to explore this issue..

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              skodak Petr Skoda added a comment -

              Ah" _FILE_ and _DIR_ are actually not relative because they get evaluated to absolute paths before calling require/include, they are very reliable. I have updated the coding style docs. Thanks a lot for spotting this.

              Show
              skodak Petr Skoda added a comment - Ah" _ FILE _ and _ DIR _ are actually not relative because they get evaluated to absolute paths before calling require/include, they are very reliable. I have updated the coding style docs. Thanks a lot for spotting this.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: