Make WordPress Core

Changeset 51076


Ignore:
Timestamp:
06/05/2021 03:45:10 PM (3 years ago)
Author:
jorbin
Message:

Booststrap/Load: Only reference recovery mode email when it can be sent.

The recovery mode email is sent from within the WP_Recovery_Mode::handle_error() method, but that method is only called by the fatal error handler if WP_Recovery_Mode has been initialized. This adjusts the message to only say the email has been sent if it can be sent.

Props reynhartono, stevegrunwell for initial plan.
Fixes #52560.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-fatal-error-handler.php

    r50272 r51076  
    183183        if ( true === $handled && wp_is_recovery_mode() ) {
    184184            $message = __( 'There has been a critical error on this website, putting it in recovery mode. Please check the Themes and Plugins screens for more details. If you just installed or updated a theme or plugin, check the relevant page for that first.' );
    185         } elseif ( is_protected_endpoint() ) {
     185        } elseif ( is_protected_endpoint() && wp_recovery_mode()->is_initialized() ) {
    186186            $message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' );
    187187        } else {
Note: See TracChangeset for help on using the changeset viewer.