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.
This commit is contained in:
Eloy Lafuente (stronk7)
2020-05-03 01:05:10 +02:00
parent cd391f9922
commit bf527c8bf9
@@ -801,7 +801,7 @@ abstract class CFBinaryPropertyList {
*/
protected static function binaryStrlen($val) {
for($i=0;$i<strlen($val);++$i) {
if(ord($val{$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<strlen($val);++$i) {
if(ord($val{$i}) >= 128) {
if(ord($val[$i]) >= 128) {
$utf16 = true;
break;
}