Make sure plugin is set. Props arickmann. fixes #5658

git-svn-id: http://svn.automattic.com/wordpress/trunk@6626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-01-16 16:45:36 +00:00
parent 7c51664827
commit a2e8bad643
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,9 @@
require_once('admin.php');
if ( isset($_GET['action']) ) {
if ( isset($_GET['plugin']) )
$plugin = trim($_GET['plugin']);
if ( 'activate' == $_GET['action'] ) {
check_admin_referer('activate-plugin_' . $_GET['plugin']);
$result = activate_plugin($_GET['plugin'], 'plugins.php?error=true&plugin=' . $plugin);
@ -9,7 +12,6 @@ if ( isset($_GET['action']) ) {
wp_die( $result->get_error_message() );
wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above
} elseif ( 'error_scrape' == $_GET['action'] ) {
$plugin = trim($_GET['plugin']);
check_admin_referer('plugin-activation-error_' . $plugin);
$valid = validate_plugin($plugin);
if ( is_wp_error($valid) )