diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php index f65e7ebc8..e0b2a3e96 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php @@ -31,6 +31,10 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface public function denormalize($data, $type, $format = null, array $context = []) { + if (null === $data) { + return null; + } + if (false === array_key_exists('type', $data)) { throw new InvalidArgumentException('missing "type" key in data'); }