[wp-trac] [WordPress Trac] #46047: Rename shutdown handler constant to allow it to be used for disabling it altogether
WordPress Trac
noreply at wordpress.org
Mon Jan 21 20:15:01 UTC 2019
#46047: Rename shutdown handler constant to allow it to be used for disabling it
altogether
----------------------------------+-----------------------
Reporter: schlessera | Owner: flixos90
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.1
Component: Bootstrap/Load | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch servehappy | Focuses:
----------------------------------+-----------------------
Changes (by flixos90):
* status: assigned => closed
* resolution: => fixed
Comment:
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/46047#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list