XMLWordPrintable

    Details

      Description

      Core has some uses of curly braces for string/array elements. That's deprecated in PHP 7.4 and only the square braces syntax is allowed. This is about to make the change of all occurrences in core (ignoring 3rd part libraries that are handled apart).

      Here it is the preliminary list, using the following command, and then removing all 3rd part libraries and some obvious false positives (mainly matches within regular expressions).

      $ ag '(\$[0-9a-zA-Z_]+|\))(\[[\w$]+\])?{[^\n=}]+}' --php | sort | uniq
       
      (removed 3rd part libraries and obvious false positives)
       
      backup/cc/cc_lib/gral_lib/pathutils.php:107:        $chr = $path{$count};
      backup/cc/cc_lib/gral_lib/pathutils.php:109:            $path{$count} = DIRECTORY_SEPARATOR;
      backup/cc/cc_lib/gral_lib/pathutils.php:121:        $chr = $path{$count};
      backup/cc/cc_lib/gral_lib/pathutils.php:123:            $path{$count} = '/';
      backup/cc/cc_lib/gral_lib/pathutils.php:91:        $chr = $path{$count};
      backup/cc/cc_lib/gral_lib/pathutils.php:93:            $path{$count} = '/';
      draftfile.php:44:} else if ($relativepath{0} != '/') {
      enrol/ldap/lib.php:437:                        $idnumber = $course{$this->config->course_idnumber}[0];
      file.php:45:} else if ($relativepath{0} != '/') {
      lib/classes/text.php:724:        $ord0 = ord($utf8char{0});
      lib/classes/text.php:728:        $ord1 = ord($utf8char{1});
      lib/classes/text.php:732:        $ord2 = ord($utf8char{2});
      lib/classes/text.php:736:        $ord3 = ord($utf8char{3});
      lib/moodlelib.php:5737:    switch ($modargs{0}) {
      lib/weblib.php:2981:        if (rand(0, 2) && $email{$i}!='@') { // MDL-20619 some browsers have problems unobfuscating @.
      lib/weblib.php:2982:            $obfuscated.='%'.dechex(ord($email{$i}));
      lib/weblib.php:2984:            $obfuscated.=$email{$i};
      lib/wiki_to_markdown.php:150:      $listchar = $line{0};
      mod/quiz/report/statistics/tests/statistics_test.php:160:                if ($start = ($items[$key]{0}=='"')) {
      mod/quiz/report/statistics/tests/statistics_test.php:162:                    while (!$end = ($items[$key]{strlen($items[$key])-1}=='"')) {
      question/engine/questionusage.php:704:                if ($responsedatakey{0} === '-') {
      question/format/gift/format.php:286:        } else if ($answertext{0} == '#') {
      

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Peer reviewer:
            Tim Hunt
            Integrator:
            Jake Dallimore
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Darko Miletic, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h