diff --git a/wp-includes/class-wp-fatal-error-handler.php b/wp-includes/class-wp-fatal-error-handler.php index e44dfed598..e469497af3 100644 --- a/wp-includes/class-wp-fatal-error-handler.php +++ b/wp-includes/class-wp-fatal-error-handler.php @@ -26,11 +26,6 @@ class WP_Fatal_Error_Handler { * @since 5.2.0 */ public function handle() { - // Bail if WordPress executed successfully. - if ( defined( 'WP_EXECUTION_SUCCEEDED' ) && WP_EXECUTION_SUCCEEDED ) { - return; - } - try { // Bail if no error found. $error = $this->detect_error(); @@ -42,8 +37,10 @@ class WP_Fatal_Error_Handler { wp_recovery_mode()->handle_error( $error ); } - // Display the PHP error template. - $this->display_error_template(); + // Display the PHP error template if headers not sent. + if ( ! headers_sent() ) { + $this->display_error_template(); + } } catch ( Exception $e ) { // Catch exceptions and remain silent. } diff --git a/wp-includes/version.php b/wp-includes/version.php index d922f18ab3..781c28ad83 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-alpha-45004'; +$wp_version = '5.2-alpha-45014'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-settings.php b/wp-settings.php index fa9f9a3a25..7b666e2851 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -544,12 +544,3 @@ if ( is_multisite() ) { * @since 3.0.0 */ do_action( 'wp_loaded' ); - -/* - * Store the fact that we could successfully execute the entire WordPress - * lifecycle. This is used to skip the premature shutdown handler, as it cannot - * be unregistered. - */ -if ( ! defined( 'WP_EXECUTION_SUCCEEDED' ) ) { - define( 'WP_EXECUTION_SUCCEEDED', true ); -}