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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47768 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-05-06 14:36:47 +00:00
parent 8e621da4ff
commit 97a336a03c
1 changed files with 5 additions and 0 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();