Make WordPress Core

Changeset 2514


Ignore:
Timestamp:
04/04/2005 02:48:18 AM (20 years ago)
Author:
ryan
Message:

Active plugins array sanity check. If the array isn't an array, reset it.

File:
1 edited

Legend:

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

    r2433 r2514  
    3030
    3131$check_plugins = get_settings('active_plugins');
     32
     33// Sanity check.  If the active plugin list is not an array, make it an
     34// empty array.
     35if ( !is_array($check_plugins) ) {
     36    $check_plugins = array();
     37    update_option('active_plugins', $check_plugins);   
     38}
     39
     40// If a plugin file does not exist, remove it from the list of active
     41// plugins.
    3242foreach ($check_plugins as $check_plugin) {
    3343    if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {
Note: See TracChangeset for help on using the changeset viewer.