From: Tim Otten Date: Sun, 15 Nov 2015 22:18:18 +0000 (-0800) Subject: CRM_Core_I18n - Reduce queries for localized word-replacements. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a565a9b6786c9ae5d8778142b1217bbcd392d527;p=civicrm-core.git CRM_Core_I18n - Reduce queries for localized word-replacements. --- 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); }