From f5d0ab2f219b4ac9ea94e1c5b2f5a2f6b4e6af3b Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 7 May 2010 18:32:20 +0000 Subject: [PATCH] Don't cache option values while installing. See #12140. git-svn-id: https://develop.svn.wordpress.org/trunk@14502 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 7bce735499..9525cfb32c 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -338,7 +338,8 @@ function get_option( $option, $default = false ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values if ( is_object( $row ) ) { $value = $row->option_value; - wp_cache_add( $option, $value, 'options' ); + if ( ! defined( 'WP_INSTALLING' ) ) + wp_cache_add( $option, $value, 'options' ); } else { // option does not exist, so we must cache its non-existence $notoptions[$option] = true; wp_cache_set( 'notoptions', $notoptions, 'options' );