diff --git a/wp-includes/cache-compat.php b/wp-includes/cache-compat.php index fe0e29c107..6f8842ab04 100644 --- a/wp-includes/cache-compat.php +++ b/wp-includes/cache-compat.php @@ -327,11 +327,11 @@ if ( ! function_exists( 'wp_cache_switch_to_blog' ) ) : * * @param int $blog_id Site ID. */ - function wp_cache_switch_to_blog( $blog_id ) { + function wp_cache_switch_to_blog( $blog_id ): void { global $wp_object_cache; // Attempt to use the drop-in object cache method if it exists. - if ( method_exists( $wp_object_cache, 'switch_to_blog' ) ) { + if ( is_object( $wp_object_cache ) && method_exists( $wp_object_cache, 'switch_to_blog' ) ) { $wp_object_cache->switch_to_blog( $blog_id ); return; } @@ -340,6 +340,6 @@ if ( ! function_exists( 'wp_cache_switch_to_blog' ) ) : * Perform a fallback blog switch, which will reinitialize the caches * for the new blog ID. */ - wp_cache_switch_to_blog_fallback( $blog_id ); + wp_cache_switch_to_blog_fallback(); } endif; diff --git a/wp-includes/version.php b/wp-includes/version.php index 37b543fc6b..a0151ad9be 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-beta5-62027'; +$wp_version = '7.0-beta5-62028'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.