[Translator] fixed recursion when using a fallback that is the same as the locale

This commit is contained in:
Fabien Potencier 2011-09-21 20:13:06 +02:00
parent e3f6b4fc0d
commit 64d44fbb93

View File

@ -180,7 +180,9 @@ class Translator implements TranslatorInterface
$this->loadCatalogue($fallback);
}
$this->catalogues[$locale]->addFallbackCatalogue($this->catalogues[$fallback]);
if ($fallback != $locale) {
$this->catalogues[$locale]->addFallbackCatalogue($this->catalogues[$fallback]);
}
}
private function computeFallbackLocale($locale)