8000 Merge branch '2.1' into 2.2 · symfony/symfony@afe1872 · GitHub
[go: up one dir, main page]

Skip to content

Commit afe1872

Browse files
committed
Merge branch '2.1' into 2.2
* 2.1: fixed typo in CS translation (closes #8069) [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065) Conflicts: src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf
2 parents b677538 + 49006b4 commit afe1872

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function validate($form, Constraint $constraint)
120120
if ($form->isRoot() && null !== $length) {
121121
$max = $this->serverParams->getPostMaxSize();
122122

123-
if (null !== $max && $length > $max) {
123+
if (!empty($max) && $length > $max) {
124124
$this->context->addViolation(
125125
$config->getOption('post_max_size_message'),
126126
array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()),

src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ public function getPostMaxSizeFixtures()
518518
array(1024, '1K', 0),
519519
array(null, '1K', 0),
520520
array(1024, '', 0),
521+
array(1024, 0, 0),
521522
);
522523
}
523524

src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
</trans-unit>
181181
<trans-unit id="48">
182182
<source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source>
183-
<target>Tato hodnota musí mít přesně {{ limit }} znak.|Tato hodnota musí mít přesně {{ limit }} znaky.|Tato hodnota musí mít přesně {{limit}} znaků.</target>
183+
<target>Tato hodnota musí mít přesně {{ limit }} znak.|Tato hodnota musí mít přesně {{ limit }} znaky.|Tato hodnota musí mít přesně {{ limit }} znaků.</target>
184184
</trans-unit>
185185
<trans-unit id="49">
186186
<source>The file was only partially uploaded.</source>

0 commit comments

Comments
 (0)
0