From 97a336a03c884af2e93df54d8e11245aad40b260 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 6 May 2020 14:36:47 +0000 Subject: [PATCH] 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 --- src/wp-includes/class-wp-fatal-error-handler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/class-wp-fatal-error-handler.php b/src/wp-includes/class-wp-fatal-error-handler.php index 43135e720d..a461281bec 100644 --- a/src/wp-includes/class-wp-fatal-error-handler.php +++ b/src/wp-includes/class-wp-fatal-error-handler.php @@ -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();