[wp-trac] [WordPress Trac] #62165: New wp_get_wp_version() might not be available during update
WordPress Trac
noreply at wordpress.org
Fri Oct 4 08:47:59 UTC 2024
#62165: New wp_get_wp_version() might not be available during update
-----------------------------+-----------------------------
Reporter: djennez | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Hi all!
I hope I was able to debug / hypothesize this issue correctly.
In [https://core.trac.wordpress.org/ticket/61627 #61627] a new method
`wp_get_wp_version()` was introduced and simultaneously used in `src/wp-
admin/includes/update-core.php` for
`_preload_old_requests_classes_and_interfaces()`.
I ''think'' the new function is not yet loaded correctly during the update
process because updating from a stable WordPress version to Nightly,
either via WP-CLI or via the `WordPress Beta Tester` plugin, causes an
Error.
Log and stacktrace from WP-CLI:
{{{#!txt
Updating to version nightly (en_US)...
Downloading update from https://wordpress.org/nightly-builds/wordpress-
latest.zip...
Unpacking the update...
[04-Oct-2024 07:58:08 UTC] PHP Fatal error: Uncaught Error: Call to
undefined function wp_get_wp_version() in /var/www/html/wp-admin/includes
/update-core.php:1547
Stack trace:
#0 /var/www/html/wp-admin/includes/update-core.php(980):
_preload_old_requests_classes_and_interfaces('/var/www/html/')
#1 /var/www/html/wp-admin/includes/class-core-upgrader.php(174):
update_core('/var/www/html/w...', '/var/www/html/')
#2 phar:///usr/local/bin/wp/vendor/wp-cli/core-
command/src/WP_CLI/Core/CoreUpgrader.php(159):
Core_Upgrader->upgrade(Object(stdClass), Array)
#3 phar:///usr/local/bin/wp/vendor/wp-cli/core-
command/src/Core_Command.php(1193):
WP_CLI\Core\CoreUpgrader->upgrade(Object(stdClass))
#4 [internal function]: Core_Command->update(Array, Array)
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array,
Array, Array)
#6 [internal function]:
WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array,
Array)
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Dispatcher/Subcommand.php(497):
call_user_func(Object(Closure), Array, Array)
#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Runner.php(441):
WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Runner.php(464): WP_CLI\Runner->run_command(Array, Array)
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Runner.php(1296): WP_CLI\Runner->run_command_and_exit()
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-
cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83):
WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32):
WP_CLI\bootstrap()
#14 phar:///usr/local/bin/wp/php/boot-phar.php(20):
include('phar:///usr/loc...')
#15 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#16 {main}
thrown in /var/www/html/wp-admin/includes/update-core.php on line 1547
Error: There has been a critical error on this website.Learn more about
troubleshooting WordPress. There has been a critical error on this
website.
}}}
Reproduction steps:
1. Run WordPress 6.6.2
2. (Option A) Attempt to update via WP-CLI with the following command: `wp
core update '--version=nightly' --force`
3. (Option B) Attempt to update to nightly using the
[https://wordpress.org/plugins/wordpress-beta-tester/ `WordPress Beta
Tester`] plugin (make sure to set it to update from `Bleeding Edge` and
not `Stable point`).
4. Notice the fatal error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62165>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list