Plugin Author
pepe
(@pputzer)
@clevelus, what‘s the text of the warning?
See now (I’m enabled plugin for 15 minutes)
Warning: mb_substr_count() expects at most 3 parameters, 4 given in … wp-content/plugins/wp-typography/vendor/masterminds/html5/src/HTML5/Parser/Scanner.php on line 249
https://clevelus.ru
Plugin Author
pepe
(@pputzer)
Thanks. It looks like your installation is somehow overloading substr_count
, because that’s the function that is actually called in that line:
return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1;
The parameter signatures for substr_count
and mb_substr_count
are completely different, so it is expected that the later would fail. That would appear to be an issue with your PHP installation, not the plugin.
All plugins on all sites and not only WordPress work without problems, except for your plug-in, but PHP 7.1 is to blame? )))
Plugin Author
pepe
(@pputzer)
No. Something on you installation (probably the deprecated mbstring.function_overload
setting) is remapping the built-in string function substr_count
to mb_substr_count
, even though those two functions are not signature-compatible.
Problem with parameter
mbstring.func_overload = 2
Your plugin requires
mbstring.func_overload = 0
(this is also a recommendation for WordPress)
Plugin Author
pepe
(@pputzer)
@clevelus: It really should not be enabled for any at least semi-modern PHP code. Yours is the first bug report regarding this, but maybe I’ll add it to the requirements checks on start-up.