mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix error when context is a string in personJsonNormalizer
This commit is contained in:
parent
b1c0e18e51
commit
f0e41f839f
@ -189,6 +189,9 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
|
|||||||
public function normalize($person, $format = null, array $context = [])
|
public function normalize($person, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
$groups = $context[AbstractNormalizer::GROUPS] ?? [];
|
$groups = $context[AbstractNormalizer::GROUPS] ?? [];
|
||||||
|
if (is_string($groups)) {
|
||||||
|
$groups = [$groups];
|
||||||
|
}
|
||||||
$household = $person->getCurrentHousehold();
|
$household = $person->getCurrentHousehold();
|
||||||
$currentResidentialAddresses = $this->residentialAddressRepository->findCurrentResidentialAddressByPerson($person);
|
$currentResidentialAddresses = $this->residentialAddressRepository->findCurrentResidentialAddressByPerson($person);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user