polyfill
polyfill copied to clipboard
Bugfix: mbstring polyfills must not raise value errors in PHP 7
trafficstars
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 the ValueError class 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.
Let's also address #506 here?