From c7710e42381f3b1847443c66e5c8406ca604faeb Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 15 Nov 2013 02:34:37 +0000 Subject: [PATCH] Invalidate the 'update_core' Update check transient when $wp_version changes. See #25831 git-svn-id: https://develop.svn.wordpress.org/trunk@26188 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/update.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php index 82a6366eba..437ffb94ee 100644 --- a/src/wp-includes/update.php +++ b/src/wp-includes/update.php @@ -31,6 +31,10 @@ function wp_version_check( $extra_stats = array() ) { $current = get_site_transient( 'update_core' ); $translations = wp_get_installed_translations( 'core' ); + // Invalidate the transient when $wp_version changes + if ( is_object( $current ) && $wp_version != $current->version_checked ) + $current = false; + if ( ! is_object($current) ) { $current = new stdClass; $current->updates = array();