diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 2189d55df9..8ae6c7f142 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -812,6 +812,8 @@ function update_core($from, $to) { // Import $wp_version, $required_php_version, and $required_mysql_version from the new version // $wp_filesystem->wp_content_dir() returned unslashed pre-2.8 + global $wp_version, $required_php_version, $required_mysql_version; + $versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php'; if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) { $wp_filesystem->delete( $from, true ); @@ -824,7 +826,7 @@ function update_core($from, $to) { $php_version = phpversion(); $mysql_version = $wpdb->db_version(); - $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from + $old_wp_version = $wp_version; // The version of WordPress we're updating from $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // a dash in the version indicates a Development release $php_compat = version_compare( $php_version, $required_php_version, '>=' ); if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) diff --git a/wp-admin/install.php b/wp-admin/install.php index 258162733f..66e3d2a7d7 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -159,6 +159,8 @@ if ( is_blog_installed() ) { die( '

' . __( 'Already Installed' ) . '

' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '

' . __( 'Log In' ) . '

' ); } +global $wp_version, $required_php_version, $required_mysql_version; + $php_version = phpversion(); $mysql_version = $wpdb->db_version(); $php_compat = version_compare( $php_version, $required_php_version, '>=' ); diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 4de67e2a7b..960c4f0c26 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -319,6 +319,8 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists