Make WordPress Core

Changeset 58436


Ignore:
Timestamp:
06/18/2024 02:39:22 PM (9 months ago)
Author:
costdev
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r58309 r58436  
    512512                    || 'locked' === $upgrade_result->get_error_code() )
    513513            ) {
     514                // Allow visitors to browse the site again.
     515                $upgrader->maintenance_mode( false );
     516
    514517                /*
    515518                 * These aren't actual errors, treat it as a skipped-update instead
Note: See TracChangeset for help on using the changeset viewer.