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.

Built from https://develop.svn.wordpress.org/trunk@51076


git-svn-id: http://core.svn.wordpress.org/trunk@50685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2021-06-05 15:46:57 +00:00
parent 00ac778b90
commit 5fac9d83a9
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ class WP_Fatal_Error_Handler {
if ( true === $handled && wp_is_recovery_mode() ) { if ( true === $handled && wp_is_recovery_mode() ) {
$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.' ); $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.' );
} elseif ( is_protected_endpoint() ) { } elseif ( is_protected_endpoint() && wp_recovery_mode()->is_initialized() ) {
$message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' ); $message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' );
} else { } else {
$message = __( 'There has been a critical error on this website.' ); $message = __( 'There has been a critical error on this website.' );

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.8-alpha-51075'; $wp_version = '5.8-alpha-51076';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.