Make WordPress Core

Changeset 55143


Ignore:
Timestamp:
01/26/2023 12:05:05 AM (21 months ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r54866 r55143  
    435435register_theme_directory( get_theme_root() );
    436436
    437 if ( ! is_multisite() ) {
     437if ( ! is_multisite() && wp_is_fatal_error_handler_enabled() ) {
    438438    // Handle users requesting a recovery mode link and initiating recovery mode.
    439439    wp_recovery_mode()->initialize();
Note: See TracChangeset for help on using the changeset viewer.