Turn Off WordPress PHP Error Display

After updating WordPress and my devformatter plugin, I noticed some errors popping up from the geshi libraries:

[22-Oct-2009 14:00:12] PHP Warning: array_keys() [function.array-keys]: The first argument should be an array in ***/geshi.php on line 3502
[22-Oct-2009 14:00:12] PHP Warning: Invalid argument supplied for foreach() in ***/geshi.php on line 3502

This was actually displaying in the blog posts, which is bad for a number of reasons, including security.

You can turn off php error logging by finding your wp-config.php file, usually in your WordPress document root, and adding the following lines:

@ini_set('log_errors','On');
@ini_set('display_errors','Off');

5 comments

Leave a comment

Your email address will not be published. Required fields are marked *