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

Update mbstring signatures for PHP 8 #6036

Merged
merged 1 commit into from
Jul 3, 2021
Merged

Update mbstring signatures for PHP 8 #6036

merged 1 commit into from
Jul 3, 2021

Conversation

mpesari
Copy link
Contributor

@mpesari mpesari commented Jul 2, 2021

Fixes #3287

I went through the mb_* functions which had return value specified as something|false in the CallMap.php, and compared them to current documentation at https://php.net

Here is the summary of functions changed in PHP 8 and links to src and/or tests:

mb_convert_case()

mb_convert_kana()

mb_decode_numericentity()

mb_encode_mimeheader()

mb_encode_numericentity()

mb_scrub()

mb_strimwidth()

mb_strlen()

mb_strtolower()

mb_strtoupper()

mb_strwidth()

mb_substr_count()

mb_substr()

@mpesari
Copy link
Contributor Author

mpesari commented Jul 2, 2021

Actually, I'm not sure what to about mb_decode_numericentity. If you look closely, the CallMap.php line had the 'is_hex' parameter, while the CallMap_80_delta.php's $new array didn't, and the $old array did have it. So.. not sure about the relation between

a) the line in CallMap.php,
b) the line in CallMap_80_delta.php's $new array, and
c) the line in CallMap_80_delta.php's $old array

Where should the (unused) 'is_hex' parameter be?

https://www.php.net/manual/en/function.mb-decode-numericentity.php

@weirdan
Copy link
Collaborator

weirdan commented Jul 2, 2021

Where should the (unused) 'is_hex' parameter be?

It was removed in PHP 8.0 (see Changelog). So it should not be present in CallMap and in 80_delta/$new, but it should be in 80_delta/$old

@weirdan weirdan merged commit 78f3e81 into vimeo:master Jul 3, 2021
@weirdan
Copy link
Collaborator

weirdan commented Jul 3, 2021

Thanks!

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.

mb_strtolower|upper does not return false
2 participants