#47323 closed defect (bug) (fixed)
Upgrading from WordPress 5.1 to 5.2.1 generates a fatal error
Reported by: | imath | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.2.1 | Priority: | normal |
Severity: | blocker | Version: | 5.2 |
Component: | Upgrade/Install | Keywords: | has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
Hi,
I'm using the WordPress Beta Tester plugin, when I upgrade from WordPress 5.1 to WordPress 5.2.1, the upgrade is interrupted by a fatal error because wp_get_update_php_annotation()
is not yet available.
Attachments (1)
Change History (13)
#1
@
5 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.2.1
- Severity changed from normal to blocker
#2
@
5 years ago
- Keywords has-patch needs-testing added; needs-patch removed
Attached patch, untested.
Needs to be tested for an upgrade from 5.1.1 and 5.0.4 to nightly after review commit to trunk.
How I personally test changes like this, prior to committing or it being in a live ZIP file that WordPress can update to:
- checkout a copy of the version of WordPress you wish to upgrade from
- Copy the latest trunk/master version of
src/wp-admin/includes/update-core.php
over the top of it, overwriting the version it came with. - Alter
src/wp-admin/includes/class-core-upgrader.php
to not overwrite the above file (For example: https://github.com/WordPress/wordpress-develop/commit/e552d2fdd26fc87f5c3d1a49c6a0ff00a0c68e0b ) - Upgrade, through WP-CLI, wp-admin, or through a cron-task if you're testing background updates.
The result is that WordPress will attempt to upgrade using the locally modified version of update-core.php
, which you can also verify by adding an extra echo
or logging to the file.
This ticket was mentioned in Slack in #core by dd32. View the logs.
5 years ago
#5
@
5 years ago
In my testing today, this seems to do the trick.
@SergeyBiryukov if your review returns the same results, let's get this in trunk
to test updating to nightly.
#6
@
5 years ago
Patch worked for me when updating from 5.1.1 using the beta tester plugin as noted in original ticket. Thanks for the testing tip @dd32.
Introduced in [45357] / #46937
upgrade-core.php
runs in the context of the previous WordPress version, any function calls to almost any function added after it was introduced need to be checked viafunction_exists()
.In addition to the mention
wp_get_update_php_annotation()
,wp_get_update_php_url()
(WP 5.1) will also need checking.