Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove utf8_encode() function #6823

Merged
merged 2 commits into from
Oct 26, 2022
Merged

Remove utf8_encode() function #6823

merged 2 commits into from
Oct 26, 2022

Conversation

krzysztofrewak
Copy link
Contributor

With PHP8.2 utf8_encode function will be deprecated (source). I refactored:

utf8_encode($text)

to:

mb_convert_encoding($text, 'UTF-8', mb_list_encodings())

to avoid problems with newer PHP versions.

@jasonvarga jasonvarga merged commit de0d804 into statamic:3.3 Oct 26, 2022
@wojtekmieszczak
Copy link

@jasonvarga note that it won't work using PHP 8.1.0 - php/php-src#7898

@jasonvarga
Copy link
Member

Great.

It's fixed in 8.1.2, at least.

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.

3 participants