Skip to content

Commit d2a316f

Browse files
committed
minor symfony#25846 [Serializer] Fix undefined class (chalasr)
This PR was merged into the 3.4 branch. Discussion ---------- [Serializer] Fix undefined class | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a bad merge Commits ------- bc7b5d2 [Serializer] fix undefined class
2 parents f5d2d67 + bc7b5d2 commit d2a316f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
8484
$timezone = $this->getTimezone($context);
8585

8686
if ('' === $data || null === $data) {
87-
throw new UnexpectedValueException('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
87+
throw new NotNormalizableValueException('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
8888
}
8989

9090
if (null !== $dateTimeFormat) {

0 commit comments

Comments
 (0)