UTF8 problem, typo, bug
-
Hi,
My error_log is getting filled with these errors:
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charsetUTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset `UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset `UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset `UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset `UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset `UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset `UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog/wp-includes/formatting.php on line 5125In line 5125 is:foreach ( $emoji as $emojum ) {
if ( version_compare( phpversion(), ‘5.4’, ‘<‘ ) ) {
$emoji_char = html_entity_decode( $emojum, ENT_COMPAT, ‘UTF-8’ );
} else {
$emoji_char = html_entity_decode( $emojum );
}
if ( false !== strpos( $content, $emoji_char ) ) {
$content = preg_replace( “/$emoji_char/”, $emojum, $content );
}
}But I think should be opposite:foreach ( $emoji as $emojum ) {
if ( version_compare( phpversion(), ‘5.4’, ‘<‘ ) ) {
$emoji_char = html_entity_decode( $emojum );
} else {
$emoji_char = html_entity_decode( $emojum, ENT_COMPAT, ‘UTF-8’ );
}
if ( false !== strpos( $content, $emoji_char ) ) {
$content = preg_replace( “/$emoji_char/”, $emojum, $content );
}
}
;`Or simply ‘<‘ should be ‘>’
Please check.
The topic ‘UTF8 problem, typo, bug’ is closed to new replies.