Hello @thebengalboy
Thanks for your quick response. I know the pain of trying to make plugins compatible. And I am fully aware that it is simple not possible to test you plugin with every combination of other plugins.
Nevertheless in this case it is very easy to make your plugin compatible (maybe also with a lot of other plugins that I don’t even know of if you change a few lines of code:
If you have a look at line 55 of /wp-content/plugins/erp/vendor/symfony/polyfill-mbstring/bootstrap.php , and change it to the following:
if (!function_exists(‘mb_ord’)) {
function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
}
if (!function_exists(‘mb_chr’)) {
function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
}
if (!function_exists(‘mb_scrub’)) {
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
}
This will make it compatible (and by the way is what I did to solve the problem for now.)
Cheers
Mike
P.S:I also checked the code in the email encoder plugin:
if ( ! function_exists( ‘mb_ord’ ) ) :
function mb_ord( $string ) {
if ( extension_loaded( ‘mbstring’ ) === true ) {
mb_language( ‘Neutral’ );
mb_internal_encoding( ‘UTF-8’ );
mb_detect_order( [ ‘UTF-8’, ‘ISO-8859-15’, ‘ISO-8859-1’, ‘ASCII’ ] );
$result = unpack( ‘N’, mb_convert_encoding( $string, ‘UCS-4BE’, ‘UTF-8’ ) );
if ( is_array( $result ) === true ) {
return $result[ 1 ];
}
}
return ord( $string );
}
They do check for the existence of mb_ord before introducing the function, so they do it absolutely correctly – there is no way for them to make it compatible, the needed changes are in /wp-content/plugins/erp/vendor/symfony/polyfill-mbstring/bootstrap.php …
-
This reply was modified 4 years, 12 months ago by videomike.