We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06db9bf commit df59e77Copy full SHA for df59e77
Constraints/DateTimeValidator.php
@@ -48,7 +48,7 @@ public function validate($value, Constraint $constraint)
48
49
\DateTime::createFromFormat($constraint->format, $value);
50
51
- $errors = \DateTime::getLastErrors();
+ $errors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warnings' => []];
52
53
if (0 < $errors['error_count']) {
54
$this->context->buildViolation($constraint->message)
0 commit comments