Navigation Menu

Skip to content

Commit

Permalink
[Translator] fixed recursion when using a fallback that is the same a…
Browse files Browse the repository at this point in the history
…s the locale
  • Loading branch information
fabpot committed Sep 21, 2011
1 parent e3f6b4f commit 64d44fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Symfony/Component/Translation/Translator.php
Expand Up @@ -180,7 +180,9 @@ private function optimizeCatalogue($locale)
$this->loadCatalogue($fallback);
}

$this->catalogues[$locale]->addFallbackCatalogue($this->catalogues[$fallback]);
if ($fallback != $locale) {
$this->catalogues[$locale]->addFallbackCatalogue($this->catalogues[$fallback]);
}
}

private function computeFallbackLocale($locale)
Expand Down

0 comments on commit 64d44fb

Please sign in to comment.