Skip to content

Commit

Permalink
MINOR Avoid duplicate var declaration in i18n::_t()
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Apr 15, 2012
1 parent 27ec83c commit 95cdbe9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions i18n/i18n.php
Expand Up @@ -1465,10 +1465,10 @@ static function _t($entity, $string = "", $priority = 40, $context = "") {
$lang = i18n::get_lang_from_locale($locale);

// Only call getter if static isn't already defined (for performance reasons)
$translators = self::$translators;
if(!$translators) $translators = self::get_translators();
$translatorsByPrio = self::$translators;
if(!$translatorsByPrio) $translatorsByPrio = self::get_translators();

foreach($translators as $priority => $translators) {
foreach($translatorsByPrio as $priority => $translators) {
foreach($translators as $name => $translator) {
$adapter = $translator->getAdapter();

Expand Down

0 comments on commit 95cdbe9

Please sign in to comment.