[wp-trac] [WordPress Trac] #51822: Ensure update-core.php knows you're using a development version

WordPress Trac noreply at wordpress.org
Sat Nov 28 18:54:41 UTC 2020


#51822: Ensure update-core.php knows you're using a development version
-------------------------------------------------+-------------------------
 Reporter:  afragen                              |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.6
Component:  Upgrade/Install                      |     Version:  5.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots commit     |     Focuses:
  dev-feedback                                   |
-------------------------------------------------+-------------------------

Comment (by afragen):

 This issue exists whether you use the Beta Tester plugin or not.

 1. Create a new WP installation and use WP-CLI to update to `5.6-beta1`.
 2. Add `define('WP_AUTO_UPDATE_CORE', 'beta');` to `wp-config.php`
 3. Go to `update-core.php` and update

 You will now be at `5.6-RC1`. Go to `update-core.php` you will see the
 statement `You have the latest version of WordPress.` This is incorrect
 and it should state that you are using a `development` version of
 WordPress. This is what the patch fixes.

 This is a consequence of the changes  to the Updates API where if a new
 update is present in `'development' === $updates[0]->response` and other
 offers are listed as `'latest'`.

 Fundamentally the old code here in `update-core.php` doesn't handle the
 new Updates API responses correctly under certain circumstances. This
 patch fixes that.

 The only other location that could be updated would be in
 `core_update_footer()` but that could certainly be in a different
 ticket/patch. Here, the Beta Tester plugin adds code to return the `You
 are using a development version (%s). Cool! ...` text.

 I'm not really aware of another issues in those other functions.

 The fundamental issue is that the Updates API only shows a `'development'`
 response if an update is available. There is "always" an update available
 when the channel is on development (Nightlies). If no update is available
 then the responses are set to `'latest'`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51822#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list