From 2f8a683fdcb957a85bab16331428e91243a49aa2 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 16 Apr 2019 04:37:46 +0000 Subject: [PATCH] General: Display fatal error handler notice in admin backend even if headers have been sent. This ensures that at least for the admin, which is more predictable than the frontend, the user-friendlier error notice from the fatal error handler still shows if a runtime fatal error happens within the page generation process. Props axaak. Fixes #46811. git-svn-id: https://develop.svn.wordpress.org/trunk@45210 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-fatal-error-handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-fatal-error-handler.php b/src/wp-includes/class-wp-fatal-error-handler.php index 270bb9e444..f041e19dd5 100644 --- a/src/wp-includes/class-wp-fatal-error-handler.php +++ b/src/wp-includes/class-wp-fatal-error-handler.php @@ -42,7 +42,7 @@ class WP_Fatal_Error_Handler { } // Display the PHP error template if headers not sent. - if ( ! headers_sent() ) { + if ( is_admin() || ! headers_sent() ) { $this->display_error_template( $error ); } } catch ( Exception $e ) {