Site Health: Do not trigger the fatal error handler while updates are being installed.

Triggering the error handler during updates may cause false positives. For example, updates may temporarily "fail" while files are moved around, but work fine once completed. Sending emails about temporary failures would just be confusing to the recipient.

Props Clorith, airamerica.
Fixes #48964.
Built from https://develop.svn.wordpress.org/trunk@47768


git-svn-id: http://core.svn.wordpress.org/trunk@47544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-05-06 14:38:17 +00:00
parent 538e9fb308
commit 86ac5e1432
2 changed files with 6 additions and 1 deletions

View File

@ -30,6 +30,11 @@ class WP_Fatal_Error_Handler {
return;
}
// Do not trigger the fatal error handler while updates are being installed.
if ( wp_in_maintenance_mode() ) {
return;
}
try {
// Bail if no error found.
$error = $this->detect_error();

View File

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