mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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
This commit is contained in:
parent
7b2c083769
commit
b90b27a6d6
@ -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.
|
||||
|
@ -54,9 +54,9 @@ if ( isset($_GET['action']) ) {
|
||||
echo '<p>' . __('Plugin failed to reactivate due to a fatal error.') . '</p>';
|
||||
|
||||
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);
|
||||
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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') ) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user