From d4d7ec693be3fe1a510e32c7c09f6c60b448235c Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 28 Nov 2013 02:16:09 +0000 Subject: [PATCH] Core Updates: Fix a case where options (db_version specifically) can end up with stale values in the cache after a update is performed. Fixes #26173 for trunk. Built from https://develop.svn.wordpress.org/trunk@26448 git-svn-id: http://core.svn.wordpress.org/trunk@26346 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/update-core.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 5586347d48..5d4d1a578f 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -892,6 +892,9 @@ function update_core($from, $to) { $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db'); wp_remote_post($db_upgrade_url, array('timeout' => 60)); + // Clear the cache to prevent an update_option() from saving a stale db_version to the cache + wp_cache_flush(); + // Remove working directory $wp_filesystem->delete($from, true);