From 6b084142dcb00fe8e2a0d88ab6d63e5ccaa2ccb5 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Tue, 15 Jan 2019 14:14:53 -0500 Subject: [PATCH] setLocale: precaution for when setLocale is called on an unilingual site --- CRM/Core/I18n.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 02340b421c..119ff57f9d 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -667,9 +667,12 @@ class CRM_Core_I18n { $this->setPhpGettextLocale($locale); } - // for sql queries + // For sql queries, if running in DB multi-lingual mode. global $dbLocale; - $dbLocale = "_{$locale}"; + + if ($dbLocale) { + $dbLocale = "_{$locale}"; + } // For self::getLocale() global $tsLocale; -- 2.25.1