8000 [Form] simplified previous merge · barros001/symfony@3922fb8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3922fb8

Browse files
committed
[Form] simplified previous merge
1 parent 7475a39 commit 3922fb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function reverseTransform($value)
142142
));
143143
}
144144

145-
if (preg_match( '/^\d*$/', $value['month'] . $value['day'] . $value['year']) === 0) {
145+
if (!ctype_digit($value['month'].$value['day'].$value['year'])) {
146146
throw new TransformationFailedException('This is an invalid date');
147147
}
148148

0 commit comments

Comments
 (0)
0