From b90b27a6d6b1db1076d5c4328a4d7e1b43928e02 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 28 Feb 2010 12:19:09 +0000 Subject: [PATCH] Display PHP Start-up Errors/Warnings. Props Denis-de-Bernardy. Fixes #12395. git-svn-id: http://svn.automattic.com/wordpress/trunk@13499 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 4 ++-- wp-admin/update.php | 4 ++-- wp-includes/load.php | 4 ++-- wp-load.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 75803a979d..a2cc31d413 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -149,9 +149,9 @@ if ( !empty($action) ) { if ( ! WP_DEBUG ) { if ( defined('E_RECOVERABLE_ERROR') ) - error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); + error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | 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); + error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); } @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. diff --git a/wp-admin/update.php b/wp-admin/update.php index 9a35258ce5..1a890531e9 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -54,9 +54,9 @@ if ( isset($_GET['action']) ) { echo '

' . __('Plugin failed to reactivate due to a fatal error.') . '

'; if ( defined('E_RECOVERABLE_ERROR') ) - error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); + error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | 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); + error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. include(WP_PLUGIN_DIR . '/' . $plugin); diff --git a/wp-includes/load.php b/wp-includes/load.php index 68cace9490..46643994ea 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -262,9 +262,9 @@ function wp_debug_mode() { } } else { if ( defined( 'E_RECOVERABLE_ERROR' ) ) - error_reporting( E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); + error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | 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 ); + error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING ); } } diff --git a/wp-load.php b/wp-load.php index aee3b39f59..7f396406e6 100644 --- a/wp-load.php +++ b/wp-load.php @@ -20,9 +20,9 @@ define( 'ABSPATH', dirname(__FILE__) . '/' ); if ( defined('E_RECOVERABLE_ERROR') ) - error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); + error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | 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); + error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); if ( file_exists( ABSPATH . 'wp-config.php') ) {