[wp-trac] [WordPress Trac] #56848: Avoid initializing WP_Recovery_Mode when fatal error handler is disabled

WordPress Trac noreply at wordpress.org
Thu Jan 26 00:05:20 UTC 2023


#56848: Avoid initializing WP_Recovery_Mode when fatal error handler is disabled
-----------------------------------------+-----------------------
 Reporter:  flixos90                     |       Owner:  flixos90
     Type:  enhancement                  |      Status:  closed
 Priority:  normal                       |   Milestone:  6.2
Component:  Site Health                  |     Version:  5.2
 Severity:  normal                       |  Resolution:  fixed
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+-----------------------
Changes (by flixos90):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55143" 55143]:
 {{{
 #!CommitTicketReference repository="" revision="55143"
 Bootstrap/Load: Avoid initializing `WP_Recovery_Mode` when fatal error
 handler is disabled.

 The WordPress recovery mode only works in combination with the fatal error
 handler that works as the entry mode for recovery mode. The fatal error
 handler can be disabled using the `WP_DISABLE_FATAL_ERROR_HANDLER`
 constant, but so far the logic in the `WP_Recovery_Mode` class was still
 being initialized even when that constant was set to `true`, which is
 unnecessary.

 This changeset updates the WordPress bootstrap process to only initialize
 `WP_Recovery_Mode` when needed.

 Props costdev.
 Fixes #56848.
 }}}

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


More information about the wp-trac mailing list