From bf527c8bf923c7ec20bd60412047a5d0ffaf30b0 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sun, 3 May 2020 01:05:10 +0200 Subject: [PATCH] MDL-68589 plist: PHP 7.4 curly bracket fixes Note this is, partially, https://github.com/TECLIB/CFPropertyList/pull/61 I only have applied the stricly required PHP 7.4 changes, keeping apart the intval() ==> (int) change, because that's unrelated to this fix. --- lib/plist/classes/CFPropertyList/CFBinaryPropertyList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plist/classes/CFPropertyList/CFBinaryPropertyList.php b/lib/plist/classes/CFPropertyList/CFBinaryPropertyList.php index 34cb7085ab1..4c340068f66 100644 --- a/lib/plist/classes/CFPropertyList/CFBinaryPropertyList.php +++ b/lib/plist/classes/CFPropertyList/CFBinaryPropertyList.php @@ -801,7 +801,7 @@ abstract class CFBinaryPropertyList { */ protected static function binaryStrlen($val) { for($i=0;$i= 128) { + if(ord($val[$i]) >= 128) { $val = self::convertCharset($val, 'UTF-8', 'UTF-16BE'); return strlen($val); } @@ -824,7 +824,7 @@ abstract class CFBinaryPropertyList { $utf16 = false; for($i=0;$i= 128) { + if(ord($val[$i]) >= 128) { $utf16 = true; break; }