diff --git a/Controller/Annotations/AbstractScalarParam.php b/Controller/Annotations/AbstractScalarParam.php index abffe0121..dd67c1741 100644 --- a/Controller/Annotations/AbstractScalarParam.php +++ b/Controller/Annotations/AbstractScalarParam.php @@ -69,9 +69,6 @@ public function getConstraints() if (false === $this->nullable) { $constraints[] = new NotNull(); } - if (false === $this->allowBlank) { - $constraints[] = new NotBlank(); - } } return $constraints; diff --git a/Tests/Controller/Annotations/AbstractScalarParamTest.php b/Tests/Controller/Annotations/AbstractScalarParamTest.php index 8e65172ea..a8499ab73 100644 --- a/Tests/Controller/Annotations/AbstractScalarParamTest.php +++ b/Tests/Controller/Annotations/AbstractScalarParamTest.php @@ -107,7 +107,7 @@ public function testArrayWithBlankConstraintsWhenParamIsAnArray() $this->assertEquals(array(new Constraints\All(array( new Constraints\NotNull(), new Constraints\NotBlank(), - )), new Constraints\NotNull(), new Constraints\NotBlank()), $this->param->getConstraints()); + )), new Constraints\NotNull()), $this->param->getConstraints()); } public function testArrayWithNoConstraintsDoesNotCreateInvalidConstraint()