8000 bug #29482 Fixes sprintf(): Too few arguments in MessageFormatter::ch… · symfony/symfony@9b25b6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b25b6a

Browse files
bug #29482 Fixes sprintf(): Too few arguments in MessageFormatter::choiceFormat (stephanedelprat)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #29482). Discussion ---------- Fixes sprintf(): Too few arguments in MessageFormatter::choiceFormat Similar to : #29344 | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | related to a previous deprecation <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | I hope so | Fixed tickets | none | License | MIT | Doc PR | none Fixes the log produced when the method is called : Before : "sprintf(): Too few arguments" After : "The "Symfony\Component\Translation\Formatter\MessageFormatter::choiceFormat()" method is deprecated since Symfony 4.2, use the format() one instead with a %count% parameter." Reference : http://php.net/manual/function.sprintf.php Commits ------- 109fee5 Fixes sprintf(): Too few arguments in Translator
2 parents e2ae5d9 + 109fee5 commit 9b25b6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Translation/Formatter/MessageFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function formatIntl(string $message, string $locale, array $parameters =
6666
*/
6767
public function choiceFormat($message, $number, $locale, array $parameters = array())
6868
{
69-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the format() one instead with a %count% parameter.', __METHOD__), E_USER_DEPRECATED);
69+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the format() one instead with a %%count%% parameter.', __METHOD__), E_USER_DEPRECATED);
7070

7171
$parameters = array('%count%' => $number) + $parameters;
7272

0 commit comments

Comments
 (0)
0