How to work around the Warning: cannot yet handle MBCS in html_entity_decode()! error with WP-Postviews
- 15 Comment
I don’t remember exactly where I found this little hack or I would have put the usual google query with a link to the source in this post. So whoever you are out there, thank you. I love the WP-Postviews plugin, but I found out after some Googling that it does not work with PHP 4 (only PHP 5). You will get the following error:
MBCS in html_entity_decode()!
Fortunately, if your site uses utf-8 encoding you can use the following one line hack to work around the PHP 4 incompatibility.
Make sure you make a backup of your wp-postviews.php file before you edit it.
-Open up wp-postviews.php in your favorite text editor.
-Look for the following line:
$text = html_entity_decode($text, ENT_QUOTES, get_option('blog_charset'));
-Replace the line with the following:
$text = utf8_decode($text);
That’s it! WP-Postviews should work perfectly now. It did for me at least . Thanks for the awesome plugin Lester!
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.