WordPress.org

Make WordPress Core

Ticket #47265: 47265.diff

File 47265.diff, 907 bytes (added by TimothyBlynJacobs, 2 years ago)
  • src/wp-includes/class-wp-fatal-error-handler.php

    diff --git a/src/wp-includes/class-wp-fatal-error-handler.php b/src/wp-includes/class-wp-fatal-error-handler.php
    index 96958d10de..f17011cc33 100644
    a b class WP_Fatal_Error_Handler { 
    3737                                return;
    3838                        }
    3939
    40                         if ( ! isset( $GLOBALS['wp_locale'] ) ) {
     40                        if ( ! isset( $GLOBALS['wp_locale'] ) && function_exists( 'load_default_textdomain' ) ) {
    4141                                load_default_textdomain();
    4242                        }
    4343
    class WP_Fatal_Error_Handler { 
    165165                        require_once ABSPATH . WPINC . '/functions.php';
    166166                }
    167167
     168                if ( ! class_exists( 'WP_Error' ) ) {
     169                        require_once ABSPATH . WPINC . '/class-wp-error.php';
     170                }
     171
    168172                if ( is_protected_endpoint() ) {
    169173                        $message = __( 'The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.' );
    170174                } else {