From c04daa1adeaa6015bcf8afd02b1c0faff7d18094 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 30 May 2014 22:07:43 +0000 Subject: [PATCH] Avoid stomping of the $plugin variable in activate_plugin(). fixes #28102. git-svn-id: https://develop.svn.wordpress.org/trunk@28644 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 442bdce2e9..b321118876 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -538,7 +538,9 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error ob_start(); wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); + $_wp_plugin_file = $plugin; include_once( WP_PLUGIN_DIR . '/' . $plugin ); + $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin. if ( ! $silent ) { /**