From a565a9b6786c9ae5d8778142b1217bbcd392d527 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 15 Nov 2015 14:18:18 -0800 Subject: [PATCH] CRM_Core_I18n - Reduce queries for localized word-replacements. --- CRM/Core/I18n.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 6a4fdd0722..d16b380feb 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -347,7 +347,8 @@ class CRM_Core_I18n { } // do all wildcard translations first - if (!isset(Civi::$statics[__CLASS__][$this->locale])) { + + if (!isset(Civi::$statics[__CLASS__]) || !array_key_exists($this->locale, Civi::$statics[__CLASS__])) { if (defined('CIVICRM_DSN') && !CRM_Core_Config::isUpgradeMode()) { Civi::$statics[__CLASS__][$this->locale] = CRM_Core_BAO_WordReplacement::getLocaleCustomStrings($this->locale); } -- 2.25.1