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.
Turning off PHP Errors in WordPressphp file. ini_set ( 'display_errors' , 'Off' );
Method 1: It is the most easy and convenient way to turn off the notices. The notices can be disabled through settings the php. ini file. In the current file, search for the line of code error_reporting.
As an interim solution, it is simple to suppress PHP deprecation warnings by disabling WP_DEBUG mode, or (more advanced) by removing E_DEPRECATED from your error_reporting setting.
You need to edit your:
wp-config.php
file and modify the following here:
error_reporting(0); @ini_set('display_errors', 0);
otherwise Wordpress overwrites the ALERTS set by PHP.INI
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With