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.

Built from https://develop.svn.wordpress.org/trunk@45210


git-svn-id: http://core.svn.wordpress.org/trunk@45019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2019-04-16 04:38:51 +00:00
parent 37f04694d5
commit f1352827f8
2 changed files with 2 additions and 2 deletions

View File

@ -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 ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta3-45209';
$wp_version = '5.2-beta3-45210';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.