Skip to content

Conversation

carp3
Copy link

@carp3 carp3 commented Oct 1, 2019

Currently asserting string length with a UTF-8 string will cause a message like this:

image

which contains an invalid UTF-8 character. it's because of substr function ( it's not UTF-8 safe )

I fixed this issue by using mb_substr instead of substr

Fixing stringify to handle UTF-8 texts
@carp3 carp3 changed the title Update Assertion.php Assertion::stringify makeing Assertion::stringify UTF-8 safe Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant