Make WordPress Core

Changeset 45210


Ignore:
Timestamp:
04/16/2019 04:37:46 AM (6 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-fatal-error-handler.php

    r45114 r45210  
    4343
    4444            // Display the PHP error template if headers not sent.
    45             if ( ! headers_sent() ) {
     45            if ( is_admin() || ! headers_sent() ) {
    4646                $this->display_error_template( $error );
    4747            }
Note: See TracChangeset for help on using the changeset viewer.