Skip to content

Commit 632703c

Browse files
Merge branch '6.0' into 6.1
* 6.0: [HttpKernel] lock when writting profiles Using identical comparison for path validation [Mime] Fix email rendering when having inlined parts that are not related to the content fix typo [HttpFoundation] move flushing outside of Response::closeOutputBuffers [FrameworkBundle] Do not throw when describing a factory definition Fix checking result of DateTime::getLastErrors [WebProfilerBundle] Fix profile search bar link query params
2 parents 14ec426 + 5c93aca commit 632703c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Constraints/DateTimeValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function validate(mixed $value, Constraint $constraint)
4242

4343
\DateTime::createFromFormat($constraint->format, $value);
4444

45-
$errors = \DateTime::getLastErrors();
45+
$errors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warnings' => []];
4646

4747
if (0 < $errors['error_count']) {
4848
$this->context->buildViolation($constraint->message)

0 commit comments

Comments
 (0)