8000 Fixes sprintf(): Too few arguments in Translator · symfony/symfony@45c3de0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45c3de0

Browse files
stephanedelpratnicolas-grekas
authored andcommitted
Fixes sprintf(): Too few arguments in Translator
Fixes the log produced when the method is called : Before : "sprintf(): Too few arguments" After : "The "Symfony\Component\Translation\Translator::transChoice()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter." Reference : http://php.net/manual/function.sprintf.php
1 parent 1aaf73e commit 45c3de0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Translation/Translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function trans($id, array $parameters = array(), $domain = null, $locale
226226
*/
227227
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null)
228228
{
229-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter.', __METHOD__), E_USER_DEPRECATED);
229+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%%count%%" parameter.', __METHOD__), E_USER_DEPRECATED);
230230

231231
if (!$this->formatter instanceof ChoiceMessageFormatterInterface) {
232232
throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter)));

0 commit comments

Comments
 (0)
0