Commit 14cfe5b4 authored by Luke Woodward's avatar Luke Woodward
Browse files

Don't use is_multisite unless it is defined

parent 48244e10
......@@ -370,8 +370,10 @@ class WP_Object_Cache {
}
// Assign global and blog prefixes for use with keys
$this->global_prefix = ( is_multisite() || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) ) ? '' : $table_prefix;
$this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix ) . ':';
if ( function_exists( 'is_multisite' ) ) {
$this->global_prefix = ( is_multisite() || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) ) ? '' : $table_prefix;
$this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix ) . ':';
}
}
/**
......@@ -845,7 +847,7 @@ class WP_Object_Cache {
* @return bool
*/
public function switch_to_blog( $_blog_id ) {
if ( ! is_multisite() ) {
if ( ! function_exists( 'is_multisite' ) || ! is_multisite() ) {
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment