Преглед изворни кода

[Form] simplified previous merge

Fabien Potencier пре 13 година
родитељ
комит
3922fb839a

+ 1 - 1
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php

@@ -142,7 +142,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
             ));
         }
 
-        if (preg_match( '/^\d*$/', $value['month'] . $value['day'] . $value['year']) === 0) {
+        if (!ctype_digit($value['month'].$value['day'].$value['year'])) {
             throw new TransformationFailedException('This is an invalid date');
         }