From 57d7375d46aa1b125c0873d7b5ff046556c92982 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 6 Dec 2015 17:38:35 +0000 Subject: [PATCH] Updates: Avoid stomping global `$wp_version` in `wp_version_check()` and related. fixes #34868. git-svn-id: https://develop.svn.wordpress.org/trunk@35779 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/update.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php index b2dd6c6eea..587e35f8a9 100644 --- a/src/wp-includes/update.php +++ b/src/wp-includes/update.php @@ -26,7 +26,7 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) { return; } - global $wp_version, $wpdb, $wp_local_package; + global $wpdb, $wp_local_package; // include an unmodified $wp_version include( ABSPATH . WPINC . '/version.php' ); $php_version = phpversion(); @@ -192,7 +192,6 @@ function wp_update_plugins( $extra_stats = array() ) { return; } - global $wp_version; // include an unmodified $wp_version include( ABSPATH . WPINC . '/version.php' ); @@ -348,7 +347,7 @@ function wp_update_themes( $extra_stats = array() ) { if ( wp_installing() ) { return; } - global $wp_version; + // include an unmodified $wp_version include( ABSPATH . WPINC . '/version.php' ); @@ -586,8 +585,8 @@ function wp_get_update_data() { * @global string $wp_version */ function _maybe_update_core() { - global $wp_version; - include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version + // include an unmodified $wp_version + include( ABSPATH . WPINC . '/version.php' ); $current = get_site_transient( 'update_core' );