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.
*/
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);
}
$utf16 = false;
for($i=0;$i<strlen($val);++$i) {
- if(ord($val{$i}) >= 128) {
+ if(ord($val[$i]) >= 128) {
$utf16 = true;
break;
}