I know about error_reporting(0);
, and ini_set('display_errors', false);
, but there is a notice appearing in wordpress:
Notice: Array to string conversion in /var/www/vhosts/treethink.net/subdomains/parkridge/httpdocs/wp-includes/formatting.php on line 359
it only appears in wordpress, not in any other pages of the site.
I checked phpinfo()
, and everything is set so that errors are not displayed. Why does this one still show up?
Here is the line that generates the error:
function wp_check_invalid_utf8( $string, $strip = false ) {
$string = (string) $string;
I did change some thing in wordpress, to change how the gallery worked. But not this function, and I don’t think I changed any calls to this function either. Aside from the notice appearing, everything seems to operate perfectly fine, I just need to get this error to hide.
You need to edit your:
file and modify the following here:
otherwise WordPress overwrites the ALERTS set by PHP.INI
Jan 2015 with latest WordPress, none of the above works for me.
Creating a php file in mu-plugins folder of WordPress worked, like :
Just name it anything you want …
i got the answer from here :
https://wycks.wordpress.com/2013/12/05/how-to-remove-error-notices-using-wordpresss-wp_debug/
In wp-config.php add this line:
That will enable or disable the display of notices and warnings to the page. There is a fuller description of this option, and some related options, here:
http://codex.wordpress.org/Debugging_in_WordPress
Most of the time these are nothing to worry about (though the plugin/theme developer should know about these so that they may fix them in a future release). PHP warnings and notices are nothing to worry about on a production site most of the time.
Some of these can even be generated because the developer has to keep compatibility with older versions of WordPress as well as older PHP versions.
with this
If you simply set WP_DEBUG to false in your wp-config.php file you should be fine. These don’t affect your site in any way.
However, the problem is that some times the above does not work.
That can happen most times on cheap shared hosts that force displaying PHP warnings and notices.
In that case, you can replace this line from your wp-config.php file:
if you want to hide only errors that comes from this function you can use
What I use and it works with the latest WordPress version.