Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork152
Bugfix: mbstring polyfills must not raise value errors in PHP 7#501
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:1.x
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
9eb2c0b to847748aCompareUh oh!
There was an error while loading.Please reload this page.
847748a tob2da01dCompare| } | ||
| if (!function_exists('mb_str_pad')) { | ||
| functionmb_str_pad(string$string,int$length,string$pad_string ='',int$pad_type =STR_PAD_RIGHT, ?string$encoding =null):string {returnp\Mbstring::mb_str_pad($string,$length,$pad_string,$pad_type,$encoding); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
what about a bootstrap80.php file to add the return types when running on PHP8+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That file already exists. ✌🏻
nicolas-grekasSep 18, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ah indeed :)
there are some failures to fix ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you help we with those? Apparently, the test listener is skipping tests at a strange point in time which conflicts with theexpectWarning() feature of PHPUnit. How do we solve that usually?
b2da01d to94414f3Compare94414f3 tofca78f8Comparenicolas-grekas commentedOct 22, 2024
Let's also address#506 here? |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#499.
This PR changes all new mbstring polyfills on PHP 7 so that they trigger an oldschool PHP warning instead of raising a
ValueError. The reason for that is that theValueErrorclass might not be available on PHP 7 and the behavior is more consitent with the other polyfills of the mbstring extension.The somewhat weird side-effect is that we now polyfill a behavior that was never implemented in PHP.