Skip to content

Commit

Permalink
Fix PHP8.2 str_split function returns empty arrays for empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
HuongNV13 authored and btry committed Feb 8, 2023
1 parent b7e9073 commit c45730a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CFPropertyList/CFBinaryPropertyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ public static function unpackWithSize($nbytes, $buff)
$format = $formats[$nbytes-1];

if ($nbytes == 3) {
$buff = "\0" . implode("\0", str_split($buff, 3));
$buff = "\0" . implode("\0", mb_str_split($buff, 3));
}
return unpack($format, $buff);
}
Expand Down

0 comments on commit c45730a

Please sign in to comment.