Skip to content

Commit 64e28bf

Browse files
committed
Merge branch '2.2' into 2.3
* 2.2: fixed typo in CS translation (closes #8069) fix arab translation [Finder] Fixed a path in a test. [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065)
2 parents 106db71 + 114c1bd commit 64e28bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Extension/Validator/Constraints/FormValidator.php

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

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

Tests/Extension/Validator/Constraints/FormValidatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ public function getPostMaxSizeFixtures()
660660
array(1024, '1K', 0),
661661
array(null, '1K', 0),
662662
array(1024, '', 0),
663+
array(1024, 0, 0),
663664
);
664665
}
665666

0 commit comments

Comments
 (0)