From b10853d4921c3ad8bbdfe786ed9a0583aa0f7f66 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 29 Apr 2009 20:18:44 +0000 Subject: [PATCH] Error reporting fixes. Props Denis-de-Bernardy, jacobsantos. fixes #9639 #8701 git-svn-id: https://develop.svn.wordpress.org/trunk@11128 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-load.php | 5 ++++- wp-settings.php | 9 +++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-load.php b/wp-load.php index d38a2ca308..cb919103e4 100644 --- a/wp-load.php +++ b/wp-load.php @@ -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') ) { diff --git a/wp-settings.php b/wp-settings.php index 3f1555fb68..74198a19ac 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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