Do not stop plugin activation due to E_DEPRECATED errors in php 5.3, props Denis-de-Bernardy, fixes #11250
git-svn-id: https://develop.svn.wordpress.org/trunk@12383 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4e8a2950a5
commit
c2fa5860cc
@ -93,7 +93,11 @@ if ( !empty($action) ) {
|
||||
if ( is_wp_error($valid) )
|
||||
wp_die($valid);
|
||||
|
||||
error_reporting( E_ALL ^ E_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);
|
||||
|
||||
@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
|
||||
include(WP_PLUGIN_DIR . '/' . $plugin);
|
||||
do_action('activate_' . $plugin);
|
||||
|
@ -52,7 +52,12 @@ if ( isset($_GET['action']) ) {
|
||||
|
||||
if( isset($_GET['failure']) ){
|
||||
echo '<p>' . __('Plugin failed to reactivate due to a fatal error.') . '</p>';
|
||||
error_reporting( E_ALL ^ E_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);
|
||||
|
||||
@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
|
||||
include(WP_PLUGIN_DIR . '/' . $plugin);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user