Moodle
  1. Moodle
  2. MDL-32453

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

    Details

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

      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..

        Issue Links

          Activity

          Hide
          Petr Škoda 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
          Petr Škoda 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: