WordPress.org

Make WordPress Core

Ticket #45989: 45989.7.diff

File 45989.7.diff, 1.6 KB (added by spacedmonkey, 18 months ago)
  • src/wp-includes/class-wp-fatal-error-handler.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    2626         * @since 5.2.0
    2727         */
    2828        public function handle() {
    29                 // Bail if WordPress executed successfully.
    30                 if ( defined( 'WP_EXECUTION_SUCCEEDED' ) && WP_EXECUTION_SUCCEEDED ) {
    31                         return;
    32                 }
    3329
    3430                try {
    3531                        // Bail if no error found.
     
    4238                                wp_recovery_mode()->handle_error( $error );
    4339                        }
    4440
    45                         // Display the PHP error template.
    46                         $this->display_error_template();
     41                        // Display the PHP error template if headers not sent.
     42                        if ( ! headers_sent() ) {
     43                                $this->display_error_template();
     44                        }
    4745                } catch ( Exception $e ) {
    4846                        // Catch exceptions and remain silent.
    4947                }
  • src/wp-settings.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    544544 * @since 3.0.0
    545545 */
    546546do_action( 'wp_loaded' );
    547 
    548 /*
    549  * Store the fact that we could successfully execute the entire WordPress
    550  * lifecycle. This is used to skip the premature shutdown handler, as it cannot
    551  * be unregistered.
    552  */
    553 if ( ! defined( 'WP_EXECUTION_SUCCEEDED' ) ) {
    554         define( 'WP_EXECUTION_SUCCEEDED', true );
    555 }