Skip to content

Commit

Permalink
Site Health: Improve the fatal error handling text in multisite scena…
Browse files Browse the repository at this point in the history
…rios.

The fatal error handler is responsible for providing a more user-friendly page to visitors if a site would normally encounter a fatal error, informing them of the next steps to access recovery mode (where applicable).

Those next steps would be to check the email address for the site administrator, but this was only the case for single site installs; In a multisite scenario, no email is sent.

This changes the text to account for that, still informing site administrators to check their email if it is a single site, but for multisite directing users to reach out to their site administrator for further assistance, so that they may take appropriate action.

Props rkaiser0324, Clorith.
Fixes #48929.

git-svn-id: https://develop.svn.wordpress.org/trunk@53951 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
Clorith committed Aug 28, 2022
1 parent 52d8c0e commit 1d45670
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wp-includes/class-wp-fatal-error-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ protected function display_default_error_template( $error, $handled ) {
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.' );
} 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.' );
if ( is_multisite() ) {
$message = __( 'There has been a critical error on this website. Please reach out to your site administrator, and inform them of this error for further assistance.' );
} else {
$message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' );
}
} else {
$message = __( 'There has been a critical error on this website.' );
}
Expand Down

0 comments on commit 1d45670

Please sign in to comment.