From cbdf7e3aed4599eb3c14b61c9348fe8a702b79d4 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 21 Apr 2010 20:34:32 +0000 Subject: [PATCH] Make sure is set correctly when advanced-cache.php is being used. git-svn-id: http://svn.automattic.com/wordpress/trunk@14180 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/load.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/load.php b/wp-includes/load.php index 4a8a131024..6e49bfd67d 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -359,6 +359,11 @@ function wp_start_object_cache() { $_wp_using_ext_object_cache = false; } $first_init = true; + } else if ( !$_wp_using_ext_object_cache && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) { + // Sometimes advanced-cache.php can load object-cache.php before it is loaded here. + // This breaks the function_exists check above and can result in $_wp_using_ext_object_cache + // being set incorrectly. Double check if an external cache exists. + $_wp_using_ext_object_cache = true; } // If cache supports reset, reset instead of init if already initialized.