Skip to content

Commit aa92f52

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 0a1a3ea + 3acb5e8 commit aa92f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/Core/DataTransformer/DateTimeToStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function reverseTransform(mixed $value): ?\DateTime
113113
$outputTz = new \DateTimeZone($this->outputTimezone);
114114
$dateTime = \DateTime::createFromFormat($this->parseFormat, $value, $outputTz);
115115

116-
$lastErrors = \DateTime::getLastErrors();
116+
$lastErrors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warning_count' => 0];
117117

118118
if (0 < $lastErrors['warning_count'] || 0 < $lastErrors['error_count']) {
119119
throw new TransformationFailedException(implode(', ', array_merge(array_values($lastErrors['warnings']), array_values($lastErrors['errors']))));

0 commit comments

Comments
 (0)