From 2038329114f83e0c8b0259dff5867ff371244a23 Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Mon, 27 May 2013 16:27:36 +0200 Subject: [PATCH 1/4] [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065) --- .../Form/Extension/Validator/Constraints/FormValidator.php | 2 +- .../Tests/Extension/Validator/Constraints/FormValidatorTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php index c0c2085b9b..0f06901060 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php @@ -126,7 +126,7 @@ class FormValidator extends ConstraintValidator if ($form->isRoot() && null !== $length) { $max = $this->serverParams->getPostMaxSize(); - if (null !== $max && $length > $max) { + if (!empty($max) && $length > $max) { $this->context->addViolation( $config->getOption('post_max_size_message'), array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()), diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php index b6e3f82c4d..9263b71e2c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -520,6 +520,7 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase array(1024, '1K', 0, null), array(null, '1K', 0, null), array(1024, '', 0, null), + array(1024, 0, 0, null), ); } From 127f3bd500b59d771b5435092bc905dd5499372c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 27 May 2013 21:26:32 +0100 Subject: [PATCH 2/4] [Finder] Fixed a path in a test. Its probably better to be explicit rather than to rely on a path position in the array. Position has changed during a merge. --- src/Symfony/Component/Finder/Tests/FinderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index 4baf52bede..2ee4a9055a 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -761,7 +761,7 @@ class FinderTest extends Iterator\RealIteratorTestCase { $locations = array( __DIR__.'/Fixtures/one', - self::$files[8], + self::$tmpDir.DIRECTORY_SEPARATOR.'toto', ); $finder = new Finder(); From 009c50dd5b429a7ab4153aa3fcc0f903492541ad Mon Sep 17 00:00:00 2001 From: ghazy ben ahmed Date: Fri, 31 May 2013 14:55:03 +0200 Subject: [PATCH 3/4] fix arab translation --- .../Validator/Resources/translations/validators.ar.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index 1b680f5909..0eb2962d4a 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -4,7 +4,7 @@ This value should be false. - هذه القيمة يجب أن تكون كاذبة. + هذه القيمة يجب أن تكون خاطئة. This value should be true. From 6d55422fd07947db0f920360492ca22336a48a74 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 2 Jun 2013 13:57:02 +0200 Subject: [PATCH 4/4] fixed typo in CS translation (closes #8069) --- .../Validator/Resources/translations/validators.cs.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf index af2d7c10ae..97e6db3a5f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf @@ -180,7 +180,7 @@ This value should have exactly {{ limit }} characters. - 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ů. + 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ů. The file was only partially uploaded.