diff options
Diffstat (limited to 'wp-includes/functions.php')
| -rw-r--r-- | wp-includes/functions.php | 18 |
1 files changed, 9 insertions, 9 deletions
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'); |
