From deb966096a1563c303d7a981fbfd410b770934b2 Mon Sep 17 00:00:00 2001 From: Samuel Vanhove Date: Mon, 27 Nov 2017 16:22:38 -0500 Subject: [PATCH] CRM-21470 Ensure we don't have an empty locale --- CRM/Utils/System/WordPress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 14cef9ef51..03528c469c 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -391,7 +391,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { // TODO: set language variable for others WordPress plugin - if (isset($language)) { + if (isset($language) && !empty($language)) { return CRM_Core_I18n_PseudoConstant::longForShort(substr($language, 0, 2)); } else { -- 2.25.1