Make WordPress Core


Ignore:
Timestamp:
05/21/2007 04:39:08 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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');
Note: See TracChangeset for help on using the changeset viewer.