Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1d7f3e

Browse files
authored
Fixed issue with new vs old TranslatorInterface
I'm not sure when this gets executed, but overriding `$trans` after the if simply looks wrong.
1 parent 63d7309 commit e1d7f3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/Translation/DataCollectorTranslator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ public function transChoice($id, $number, array $parameters = [], $domain = null
6969
if ($this->translator instanceof TranslatorInterface) {
7070
$trans = $this->translator->trans($id, ['%count%' => $number] + $parameters, $domain, $locale);
7171
}
72-
73-
$trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale);
72+
else {
73+
$trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale);
74+
}
7475

7576
$this->collectMessage($locale, $domain, $id, $trans, ['%count%' => $number] + $parameters);
7677

0 commit comments

Comments
 (0)