Make WordPress Core

Changeset 2932


Ignore:
Timestamp:
10/05/2005 11:19:48 PM (18 years ago)
Author:
ryan
Message:

Actually remove deleted plugins from the active plugin list. This has been broken for ever. fixes #1709

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r2762 r2932  
    4444    if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {
    4545            $current = get_settings('active_plugins');
    46             unset($current[$_GET['plugin']]);
    47             update_option('active_plugins', $current);
     46            $key = array_search($check_plugin, $current);
     47            if ( false !== $key && NULL !== $key ) {
     48                unset($current[$key]);
     49                update_option('active_plugins', $current);
     50            }
    4851    }
    4952}
Note: See TracChangeset for help on using the changeset viewer.