From fcb5acb7e5f6d719a241e06a50c8455e9d597c02 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sat, 27 Feb 2010 07:24:41 +0000 Subject: [PATCH] Plugin activation attempt goes through a function to show the same errors as the test. props miqrogroove. fixes #12089 git-svn-id: http://svn.automattic.com/wordpress/trunk@13452 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;