From 003616dbd986a7ba41d1e325401abf68606d26f5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 30 Aug 2016 05:56:13 +0000 Subject: [PATCH] i18n: after r38364, check that `global $wp_locale` is an instance of `WP_Locale` before calling `->is_rtle()` in `is_rtl()`. See #37827. git-svn-id: https://develop.svn.wordpress.org/trunk@38438 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/l10n.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index 7bc1c6abdf..aaa7611f22 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -1144,5 +1144,8 @@ function wp_dropdown_languages( $args = array() ) { */ function is_rtl() { global $wp_locale; + if ( ! ( $wp_locale instanceof WP_Locale ) ) { + return false; + } return $wp_locale->is_rtl(); } \ No newline at end of file