From 6b458a50bfed94a5ac62db3dd53dd5bc74040166 Mon Sep 17 00:00:00 2001 From: costdev Date: Tue, 18 Jun 2024 14:41:05 +0000 Subject: [PATCH] Upgrade/Install: Disable maintenance mode when core auto-update fails. In [58128], additional maintenance mode calls were added to the automatic updates process. However, there is an early return if a 'core' automatic update fails. Maintenance mode isn't disabled until later in the `WP_Automatic_Updater::update()` method. This means that maintenance mode may continue to be enabled despite the core update being treated as a skipped update. This disables maintenance mode before the early return. Follow-up to [58128]. Props costdev, hellofromTonya, peterwilsoncc. Fixes #61459. See #58281. Built from https://develop.svn.wordpress.org/trunk@58436 git-svn-id: http://core.svn.wordpress.org/trunk@57885 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-automatic-updater.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index e8c8c3189a..c96bededd9 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -511,6 +511,9 @@ class WP_Automatic_Updater { && ( 'up_to_date' === $upgrade_result->get_error_code() || 'locked' === $upgrade_result->get_error_code() ) ) { + // Allow visitors to browse the site again. + $upgrader->maintenance_mode( false ); + /* * These aren't actual errors, treat it as a skipped-update instead * to avoid triggering the post-core update failure routines. diff --git a/wp-includes/version.php b/wp-includes/version.php index 8f1c5bdc6d..45917072ae 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-beta2-58435'; +$wp_version = '6.6-beta2-58436'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.