Check if value is not set. Possible in the use_cache = false scenario.
git-svn-id: https://develop.svn.wordpress.org/trunk@14101 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3cc1ff4546
commit
3aca04a67b
|
@ -3421,7 +3421,7 @@ function get_site_option( $option, $default = false, $use_cache = true ) {
|
||||||
if ( $use_cache )
|
if ( $use_cache )
|
||||||
$value = wp_cache_get($cache_key, 'site-options');
|
$value = wp_cache_get($cache_key, 'site-options');
|
||||||
|
|
||||||
if ( false === $value ) {
|
if ( !isset($value) || (false === $value) ) {
|
||||||
$value = $wpdb->get_var( $wpdb->prepare("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) );
|
$value = $wpdb->get_var( $wpdb->prepare("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) );
|
||||||
|
|
||||||
if ( is_null($value) )
|
if ( is_null($value) )
|
||||||
|
|
Loading…
Reference in New Issue