diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php index 1901fd50c..1969fffa7 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php @@ -189,6 +189,9 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar public function normalize($person, $format = null, array $context = []) { $groups = $context[AbstractNormalizer::GROUPS] ?? []; + if (is_string($groups)) { + $groups = [$groups]; + } $household = $person->getCurrentHousehold(); $currentResidentialAddresses = $this->residentialAddressRepository->findCurrentResidentialAddressByPerson($person);