Changeset 5501

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

Check if is_array before unsetting array index. fixes #4306 for 2.3

Files:

Legend:

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

    r5492 r5501  
    331331 
    332332    $notoptions = wp_cache_get('notoptions', 'options'); 
    333     if ( isset($notoptions[$option_name]) ) { 
     333    if ( is_array($notoptions) && isset($notoptions[$option_name]) ) { 
    334334        unset($notoptions[$option_name]); 
    335335        wp_cache_set('notoptions', $notoptions, 'options'); 
     
    365365    // Make sure the option doesn't already exist we can check the cache before we ask for a db query 
    366366    $notoptions = wp_cache_get('notoptions', 'options'); 
    367     if ( isset($notoptions[$name]) ) { 
     367    if ( is_array($notoptions) && isset($notoptions[$name]) ) { 
    368368        unset($notoptions[$name]); 
    369369        wp_cache_set('notoptions', $notoptions, 'options');