Oleksandr Budnytskyy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: error in compat.php on line 30My solution is temporary, because it lost after upgrading WP. This is reason, which I do not share my vaariant of solution.
Forum: Fixing WordPress
In reply to: error in compat.php on line 30Yes, I haven’t been able to install extension to hosting, so I change string 18 in file compat.php
return _mb_substr($str, $start, $length, $encoding);
to
return substr($str, $start, $length);
It make positive effect and theme work. But due limited resources it was very slow.
Because of this, the customer replaced the bulky theme for the simpler.Forum: Fixing WordPress
In reply to: error in compat.php on line 30function mb_substr is different from function substr by the presence of utf8-string manipulation only. Main part is
preg_match_all( ‘/./us’, $str, $match );
Modificator /u have to filter illegal utf-8 characters.
It looks strange declaration of this function
17 function mb_substr( $str, $start, $length=null, $encoding=null )
22 function _mb_substr( $str, $start, $length=null, $encoding=null )$encoding parameter is not used in the function _mb_substr
However, this function is called once the core files of WordPress:
– /wp-includes/post.php: function get_sample_permalink_html (string 1209)
– /wp-includes/formating.php: function wp-html-excerpt (3640)
– /wp-includes/pomo/streams.php: internal class function substr with parameter $encoding=”ascii” (64)
– /wp-includes/class_phpmailer: function base64EncodeWrapMD with parameter $encoding=”$this->Charset (2304)
– /wp-includes/class-json.php: function substr8 with parameter $encoding=”8bit” (902)None of these function is not called by current theme direct.
Forum: Fixing WordPress
In reply to: error in compat.php on line 30You’re right, WordPress reacts on specific themes, and this in particular. Current theme is not written by me, I involved to installation theme on hosting only.
But this theme has not call of function mb_substr. So, I think, this function is called by another kernel functions (I’ll try to dig later).This theme was successfully start on server apache under windows, under wordpress 3.9.2 and wordpress 4.0 Trouble apear at hosting by *nix.
I think, it may be an issue with combination: theme, wordpress and hosting/servers resource (may be version apache, its modules or php).
My interest – to understand the cause and not to step on a rake in the future.