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

PHP 54 & 55 error in 31_STABLE

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Only for 31_STABLE:

      1) Visually verify in the code diff that the inserted regexp in the 2 constants is exactly PLACEHOLDER_REGEX_PART.

      2) Ensure the php54 linter says that php -l question/type/calculated/questiontype.php is ok.

      3) Run -c question unit tests continue passing ok.

      Note that 2) and 3) above are run by both travis and CiBoT so, if they are passing, there isn't much to test, just visually 1).

      Show
      Only for 31_STABLE: 1) Visually verify in the code diff that the inserted regexp in the 2 constants is exactly PLACEHOLDER_REGEX_PART . 2) Ensure the php54 linter says that php -l question/type/calculated/questiontype.php is ok. 3) Run -c question unit tests continue passing ok. Note that 2) and 3) above are run by both travis and CiBoT so, if they are passing, there isn't much to test, just visually 1).
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:

      Description

      A problem in 31_STABLE has been detected under php 54 and 55:

      Moodle 3.1.11+ (Build: 20180509), b6c0d8fc2a3f30bc37a3f1dbcd115df9e2a263f9
      Php: 5.4.45, pgsql: 9.3.20, OS: Darwin 15.6.0 x86_64
      PHP Parse error:  syntax error, unexpected '.', expecting ',' or ';' in /git_repositories/MOODLE_31_STABLE/question/type/calculated/questiontype.php on line 49
      

      PHP 54 and 55 don't allow such a complications in constants:

      https://3v4l.org/4Eokl

      Ciao

      PS: Note this in ONLY 31_STABLE. Next versions already require php 56, and it works ok there.

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Peer reviewer:
            Víctor Déniz Falcón
            Integrator:
            David Monllaó
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              17/May/18