From d48b70907171773b3eba9b670589a3f4effa4ba1 Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 2 May 2019 10:53:52 +0000 Subject: [PATCH] Bootstrap/Load: Ensure recovery link email and related notices are properly translated. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When recovery mode is triggered before the site’s locale has been initialized, the message displayed to the user and the email sent to the site administrator with the recovery mode link are always rendered in `en_US`. This change ensures the site’s locale is used even when an error happens early in the loading process. Reviewed by swissspidy, SergeyBiryukov, and desrosj. Props wolly, TimothyBlynJacobs, fierevere. Fixes #47093. Built from https://develop.svn.wordpress.org/trunk@45277 git-svn-id: http://core.svn.wordpress.org/trunk@45086 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-fatal-error-handler.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-fatal-error-handler.php b/wp-includes/class-wp-fatal-error-handler.php index 458f674104..96958d10de 100644 --- a/wp-includes/class-wp-fatal-error-handler.php +++ b/wp-includes/class-wp-fatal-error-handler.php @@ -37,6 +37,10 @@ class WP_Fatal_Error_Handler { return; } + if ( ! isset( $GLOBALS['wp_locale'] ) ) { + load_default_textdomain(); + } + if ( ! is_multisite() && wp_recovery_mode()->is_initialized() ) { wp_recovery_mode()->handle_error( $error ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index e7f8fdc562..75a592658a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-RC1-45276'; +$wp_version = '5.2-RC1-45277'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.