Archive

Posts Tagged ‘php’

Turn Off Wordpress PHP Error Display

October 22nd, 2009

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

1
2
[22-Oct-2009 14:00:12] PHP Warning:  array_keys() [<a href='function.array-keys'>function.array-keys</a>]: 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:

1
2
@ini_set('log_errors','On');
@ini_set('display_errors','Off');
  • Share/Bookmark
Author: alex Categories: IT Tags: , , , ,