Changeset 5500

Show
Ignore:
Timestamp:
05/21/07 16:38:53 (1 year ago)
Author:
ryan
Message:

Check if is_array before unsetting array index. fixes #4306

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2/wp-includes/functions.php

    r5492 r5500  
    323323 
    324324    $notoptions = wp_cache_get('notoptions', 'options'); 
    325     if ( isset($notoptions[$option_name]) ) { 
     325    if ( is_array($notoptions) && isset($notoptions[$option_name]) ) { 
    326326        unset($notoptions[$option_name]); 
    327327        wp_cache_set('notoptions', $notoptions, 'options'); 
     
    357357    // Make sure the option doesn't already exist we can check the cache before we ask for a db query 
    358358    $notoptions = wp_cache_get('notoptions', 'options'); 
    359     if ( isset($notoptions[$name]) ) { 
     359    if ( is_array($notoptions) && isset($notoptions[$name]) ) { 
    360360        unset($notoptions[$name]); 
    361361        wp_cache_set('notoptions', $notoptions, 'options');