From f7c049ff604ea5bad2cbc3817a719b9f36b9e831 Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 23 May 2008 17:40:14 +0000 Subject: Shouldn't check for switching when we check for not switching inside .. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1311 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/functions.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'wp-includes/functions.php') diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e12e2aa..7533faa 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -202,16 +202,16 @@ function get_option( $setting ) { if ( false !== $pre ) return $pre; - if ( $switched != false || defined('WP_INSTALLING') != false ) { - global $blog_id, $switched_to; - if( $switched_to != $blog_id && function_exists('error_log') ) { - $msg = "{$_SERVER[ 'HTTP_HOST' ]}{$_SERVER[ 'REQUEST_URI' ]} blog_id changed without calling switch_to_blog(). Current value: $blog_id"; - if( defined( 'ERRORLOGFILE' ) ) { - error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ) ); - } else { - error_log( $msg ); - } + global $blog_id; + if( $wpdb->blogid != $blog_id && function_exists('error_log') ) { + $msg = "{$_SERVER[ 'HTTP_HOST' ]}{$_SERVER[ 'REQUEST_URI' ]} blog_id changed without calling switch_to_blog(). Current value: $blog_id"; + if( defined( 'ERRORLOGFILE' ) ) { + error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ) ); + } else { + error_log( $msg ); } + } + if ( $switched != false || defined('WP_INSTALLING') != false ) { //wp_cache_delete($setting, 'options'); //wp_cache_delete('notoptions', 'options'); //wp_cache_delete('alloptions', 'options'); -- cgit