From 23f08d0e6f2ffd3a914af1f290b0d9babee76784 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 3 Dec 2020 20:21:14 +0000 Subject: [PATCH] Upgrade/Install: Check `$wp_version` global for displaying "You are using a development version" message in the admin footer. This brings some consistency with the same check in `core_upgrade_preamble()` and avoids a PHP warning if `$cur->version` is not set. Additionally, remove the check for `$cur->url` property, unused since [8595]. Follow-up to [49708], [49709]. Props pbiron, afragen, audrasjb. Reviewed by azaozz, SergeyBiryukov. Merges [49736] to the 5.6 branch. Fixes #51892. git-svn-id: https://develop.svn.wordpress.org/branches/5.6@49743 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 8c8d8a0747..e01fd28eb3 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -240,15 +240,14 @@ function core_update_footer( $msg = '' ) { $cur->current = ''; } - if ( ! isset( $cur->url ) ) { - $cur->url = ''; - } - if ( ! isset( $cur->response ) ) { $cur->response = ''; } - $is_development_version = preg_match( '/alpha|beta|RC/', $cur->version ); + // Include an unmodified $wp_version. + require ABSPATH . WPINC . '/version.php'; + + $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( $is_development_version && 'latest' === $cur->response ) { $cur->response = 'development';