-
Sub-task
-
Resolution: Fixed
-
Minor
-
3.8, 3.9
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_38_STABLE
-
- Once all replacements have been checked.
- Automatic testing (CI) should be enough.
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} == '#') {
|
- is duplicated by
-
MDL-80477 error 500 with import of questions to question bank
-
- Closed
-