8000 Removed check for NULL value. Otherwise $validator->isValid(null, new… · symfony/symfony@474b4ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 474b4ab

Browse files
author
Oncle Tom
committed
Removed check for NULL value. Otherwise $validator->isValid(null, new Type('type' => 'integer')) fails.
1 parent 277d75b commit 474b4ab

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/Symfony/Component/Validator/Constraints/TypeValidator.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ class TypeValidator extends ConstraintValidator
3131
*/
3232
public function isValid($value, Constraint $constraint)
3333
{
34-
if (null === $value) {
35-
return true;
36-
}
37-
3834
$type = $constraint->type == 'boolean' ? 'bool' : $constraint->type;
3935
$function = 'is_'.$type;
4036

0 commit comments

Comments
 (0)
0