[wp-trac] [WordPress Trac] #44458: Catch WSODs and provide a means for recovery for end users
WordPress Trac
noreply at wordpress.org
Mon Jan 7 17:21:28 UTC 2019
#44458: Catch WSODs and provide a means for recovery for end users
-------------------------------------------------+-------------------------
Reporter: schlessera | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.1
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing servehappy | Focuses: multisite
needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by flixos90):
* keywords: has-patch needs-unit-tests needs-testing servehappy needs-dev-
note => has-patch needs-testing servehappy needs-dev-note
Comment:
[attachment:"44458.12.diff"] introduces a `WP_Shutdown_Handler` class that
represents the shutdown handler. Its `handle()` method is the only public
method and is used as the callback for `register_shutdown_function()`.
Relying a class like this makes it easier to provide a custom
implementation via the new `shutdown-handler.php` drop-in. Since the
distinct steps the default handler performs are separate methods, you can
easily reuse what you like while overriding the parts you want to change.
The patch also hardens the logic a bit further, for example covering the
case where the Translation APIs have not been loaded yet. It also prevents
an error where the default error template would use invalid HTML markup.
As usual, you can get a better overview of this change in particular on
GitHub, via https://github.com/wp-core-php/wordpress-
develop/pull/3/commits/851cfe7001cf64636cab04d5a23f4fb12a3e1fee.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44458#comment:52>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list