diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 81ed9052964c..e21c705fd700 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -273,15 +273,10 @@ protected function getLoaders() */ public function getMessages($locale = null) { - $catalogues = array(); - $catalogues[] = $catalogue = $this->getCatalogue($locale); + $catalogue = $this->getCatalogue($locale); + $messages = $catalogue->all(); while ($catalogue = $catalogue->getFallbackCatalogue()) { - $catalogues[] = $catalogue; - } - $messages = array(); - for ($i = count($catalogues) - 1; $i >= 0; $i--) { - $localeMessages = $catalogues[$i]->all(); - $messages = array_replace_recursive($messages, $localeMessages); + $messages = array_replace_recursive($catalogue->all(), $messages); } return $messages; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy