Changeset 2932

Show
Ignore:
Timestamp:
10/05/05 23:19:48 (3 years ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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}