Make WordPress Core


Ignore:
Timestamp:
10/19/2011 09:06:50 PM (14 years ago)
Author:
duck_
Message:

Don't cache default value in get_site_option() for non-existent options. Fixes #18955.

File:
1 edited

Legend:

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

    r18923 r19012  
    37993799
    38003800            // Has to be get_row instead of get_var because of funkiness with 0, false, null values
    3801             if ( is_object( $row ) )
     3801            if ( is_object( $row ) ) {
    38023802                $value = $row->meta_value;
    3803             else
     3803                $value = maybe_unserialize( $value );
     3804                wp_cache_set( $cache_key, $value, 'site-options' );
     3805            } else {
    38043806                $value = $default;
    3805 
    3806             $value = maybe_unserialize( $value );
    3807 
    3808             wp_cache_set( $cache_key, $value, 'site-options' );
     3807            }
    38093808        }
    38103809    }
Note: See TracChangeset for help on using the changeset viewer.