Permalink
Browse files

Denormalize only non-null values when deserializing data

  • Loading branch information...
lanthaler committed Jul 20, 2014
1 parent d7701bf commit 9b8e764dd1b42aad3e6297476a0bdb597d0f6ed6
Showing with 1 addition and 1 deletion.
  1. +1 −1 Serializer/Serializer.php
@@ -302,7 +302,7 @@ private function doDeserialize($data, $entity)
$value = $value->getValue();
}
if ($this->hydraApi->hasNormalizer($property->getType())) {
if (!is_null($value) && $this->hydraApi->hasNormalizer($property->getType())) {
$normalizer = $this->hydraApi->getNormalizer($property->getType());
$value = $normalizer->denormalize($value, $property->getType());
}

0 comments on commit 9b8e764

Please sign in to comment.