You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing a PHP Fatal error while using portable-utf8 in a wordpress plugin when PHP is built with'--enable-mbstring' '--disable-mbregex' (which is the case, at the current date, for deployed WordPress/wordpress-playground).
As in topic, the error is: Uncaught Error: Call to undefined function mb_regex_encoding() in .../vendor/voku/portable-utf8/src/voku/helper/UTF8.php:536
I'm experiencing a PHP Fatal error while using portable-utf8 in a wordpress plugin when PHP is built with
'--enable-mbstring' '--disable-mbregex'
(which is the case, at the current date, for deployed WordPress/wordpress-playground).As in topic, the error is:
Uncaught Error: Call to undefined function mb_regex_encoding() in .../vendor/voku/portable-utf8/src/voku/helper/UTF8.php:536
It seems that while detecting for UTF8 support,
portable-utf8/src/voku/helper/UTF8.php
Line 531 in a1333ac
portable-utf8 checks for extension_loaded('mbstring')
portable-utf8/src/voku/helper/UTF8.php
Line 4535 in a1333ac
and then it takes it for granted that mb_regex_encoding() is available.
portable-utf8/src/voku/helper/UTF8.php
Line 536 in a1333ac
But mb_regex_encoding() is available only when PHP is built without '--disable-regex' https://www.php.net/manual/en/mbstring.installation.php
A related possible problem is that symfony/polyfill-mbstring does not provide polyfills for mbregex function.
The only package I have found that can provide polyfill for mbregex is zendtech/polyfill-mb-ereg but even if it declares to provide a polyfill for mb_regex_encoding(), the code is:
https://github.com/zendtech/polyfill-mb-ereg/blob/813e5b2d0669a8c619e6b5439916b2e5d20d7af0/src/MbEreg.php#L58C1-L65C6
However I didn't test any patch to see what happens using this library.
The text was updated successfully, but these errors were encountered: