WordPress.org

Make WordPress Core

Ticket #46825: 46825.patch

File 46825.patch, 1.2 KB (added by aandrewdixon, 16 months ago)

Patch sets define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); if debug mode is true, however, I had to move where debug mode is initialized up in wp-settings.php. It all still seems to work as expected.

  • src/wp-settings.php

     
    4848// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
    4949wp_initial_constants();
    5050
     51// Check if we're in WP_DEBUG mode.
     52wp_debug_mode();
     53
    5154// Make sure we register the shutdown handler for fatal errors as soon as possible.
    5255wp_register_fatal_error_handler();
    5356
     
    7679// Start loading timer.
    7780timer_start();
    7881
    79 // Check if we're in WP_DEBUG mode.
    80 wp_debug_mode();
    81 
    8282/**
    8383 * Filters whether to enable loading of the advanced-cache.php drop-in.
    8484 *
  • src/wp-includes/load.php

     
    339339                        ini_set( 'log_errors', 1 );
    340340                        ini_set( 'error_log', $log_path );
    341341                }
     342
     343                define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
    342344        } else {
    343345                error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    344346        }