Closed
Description
Symfony version(s) affected
5.3
Description
Method readLocalTranslations has wrongly implemented filterCatalogue
method;
In TranslationTrait
near line 35
we have:
foreach ($domains as $domain) {
$catalogue = $this->filterCatalogue($catalogue, $domain);
$bag->addCatalogue($catalogue);
}
The problem is:
$catalogue = $this->filterCatalogue($catalogue, $domain);
If there are more than one domain, after the first run of the loop we got filtered $catalogue. So we can't find second domain.
How to reproduce
try to to use readLocalTranslations() with more than one $domain
Possible Solution
foreach ($domains as $domain) {
$catalogue = $this->filterCatalogue($catalogue, $domain);
$bag->addCatalogue($catalogue);
}
change to:
foreach ($domains as $domain) {
$newCatalogue = $this->filterCatalogue($catalogue, $domain);
$bag->addCatalogue($newCatalogue);
}
Additional Context
No response