From b69028e6264eddffb841895ddbe61b0f74cde389 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sun, 27 Oct 2019 00:21:56 +0200 Subject: [PATCH] MDL-67034 google: php74 fix (curly braces) for the Google-Client lib --- lib/google/readme_moodle.txt | 3 +++ lib/google/src/Google/Utils.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/google/readme_moodle.txt b/lib/google/readme_moodle.txt index c9253a229ab..15358b7e921 100644 --- a/lib/google/readme_moodle.txt +++ b/lib/google/readme_moodle.txt @@ -36,6 +36,9 @@ Here are the files that we have added. This should not ever be used directly. The wrapper above uses it automatically. +Local changes (to reapply until upstream upgrades contain them): + * MDL-67034 php74 compliance fixes + Information ----------- diff --git a/lib/google/src/Google/Utils.php b/lib/google/src/Google/Utils.php index 2803daaa109..2366d4d5ae7 100644 --- a/lib/google/src/Google/Utils.php +++ b/lib/google/src/Google/Utils.php @@ -62,7 +62,7 @@ class Google_Utils $strlenVar = strlen($str); $d = $ret = 0; for ($count = 0; $count < $strlenVar; ++ $count) { - $ordinalValue = ord($str{$ret}); + $ordinalValue = ord($str[$ret]); switch (true) { case (($ordinalValue >= 0x20) && ($ordinalValue <= 0x7F)): // characters U-00000000 - U-0000007F (same as ASCII)