Carson Myers Carson Myers - 3 months ago 17
PHP Question

How can I stop PHP notices from appearing in wordpress?

I know about

, and
ini_set('display_errors', false);
, but there is a notice appearing in wordpress:

Notice: Array to string conversion in /var/www/vhosts/ on line 359

it only appears in wordpress, not in any other pages of the site.

I checked
, 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:

@ini_set('display_errors', 0);

otherwise Wordpress overwrites the ALERTS set by PHP.INI