Error reporting fixes. Props Denis-de-Bernardy, jacobsantos. fixes #9639 #8701

git-svn-id: http://svn.automattic.com/wordpress/trunk@11128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-29 20:18:44 +00:00
parent 942d030b1d
commit ee0bfee679
2 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,10 @@
/** Define ABSPATH as this files directory */
define( 'ABSPATH', dirname(__FILE__) . '/' );
error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
if ( defined('E_RECOVERABLE_ERROR') )
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
else
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);
if ( file_exists( ABSPATH . 'wp-config.php') ) {

View File

@ -201,13 +201,10 @@ timer_start();
if (defined('WP_DEBUG') and WP_DEBUG == true) {
error_reporting(E_ALL);
} else {
// Unicode Extension is in PHP 6.0 only or do version check when this changes.
if ( function_exists('unicode_decode') )
error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ^ E_STRICT );
else if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3
error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE );
if ( defined('E_RECOVERABLE_ERROR') )
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
else
error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);
}
// For an advanced caching plugin to use, static because you would only want one