diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index ef80680ae..22eaa52c5 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -155,7 +155,11 @@ if ( !empty($action) ) { } @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. - include(WP_PLUGIN_DIR . '/' . $plugin); + // Go back to "sandbox" scope so we get the same errors as before + function plugin_sandbox_scrape( $plugin ) { + include( WP_PLUGIN_DIR . '/' . $plugin ); + } + plugin_sandbox_scrape( $plugin ); do_action('activate_' . $plugin); exit; break;