Closed HuongNV13 closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
I'm not sure why exactly, but something is different in mb_str_split
that is causing all our tests to fail
Hi @bshaffer, The failed tests are related to the CLA. I have signed the CLA and rebased the code.
@HuongNV13 CLA has passed but the test suites are still failing as you can see, Can you check once again?
The two functions behave differently when dealing with a binary string, which is the case here:
str_split() will split into bytes, rather than characters when dealing with a multi-byte encoded string. Use mb_str_split() to split the string into code points.
If there's a specific error you're trying to prevent, perhaps you can do it by verifying the input beforehand.
In PHP 8.2, the str_split function will returns empty arrays for empty strings. See: https://php.watch/versions/8.2/str_split-empty-string-empty-array
We can use mb_str_split() instead