[wp-trac] [WordPress Trac] #44458: Catch WSODs and provide a means for recovery for end users

WordPress Trac noreply at wordpress.org
Mon Jan 21 20:15:01 UTC 2019


#44458: Catch WSODs and provide a means for recovery for end users
-----------------------------------------------+------------------------
 Reporter:  schlessera                         |       Owner:  flixos90
     Type:  task (blessed)                     |      Status:  closed
 Priority:  normal                             |   Milestone:  5.1
Component:  Bootstrap/Load                     |     Version:
 Severity:  normal                             |  Resolution:  fixed
 Keywords:  has-dev-note has-patch servehappy  |     Focuses:  multisite
-----------------------------------------------+------------------------

Comment (by flixos90):

 In [changeset:"44674" 44674]:
 {{{
 #!CommitTicketReference repository="" revision="44674"
 Bootstrap/Load: Change `shutdown handler` naming to final `fatal error
 handler` and allow disabling the handler entirely via a constant.

 The `WP_Shutdown_Handler` name plus related function names were premature
 when originally committed, as there can be multiple shutdown handlers in
 PHP, and WordPress makes use of that feature. This changeset modifies the
 name to a more appropriate `WP_Fatal_Error_Handler`, and related to that
 changes the following names:

 * The drop-in to override the handler is now called `fatal-error-
 handler.php`.
 * The internal function `wp_register_premature_shutdown_handler` is now
 called `wp_register_fatal_error_handler()`.

 In addition to these naming changes, a new constant
 `WP_DISABLE_FATAL_ERROR_HANDLER` is introduced that can be set in `wp-
 config.php` to entirely disable the fatal error handler. That constant's
 value is and should be accessed indirectly via a new
 `wp_is_fatal_error_handler_enabled()` function and is filterable via a new
 `wp_fatal_error_handler_enabled` hook. Note that disabling the fatal error
 handler will skip the new functionality entirely, including the
 potentially used `fatal-error-handler.php` drop-in.

 The new set of constant, filter and function provide for an easier-to-use
 mechanism to disable the fatal error handler altogether, rather than
 requiring developers to implement a drop-in for purely that purpose.

 Props afragen, flixos90, joyously, knutsp, markjaquith, ocean90,
 schlessera, spacedmonkey.
 Fixes #46047. See #44458.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44458#comment:71>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list