Fixed #1276: Symfony Serializer Groups cause Exception while parsing

This commit is contained in:
Dmytro Boiko 2018-04-05 15:54:51 +03:00
parent 0a946c5529
commit badcc8abdd

View File

@ -63,8 +63,8 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar
$property = $properties->get($annotationsReader->getPropertyName($reflectionProperty, $propertyName));
$groups = $model->getGroups();
if (isset($groups[$property]) && is_array($groups[$property])) {
$groups = $model->getGroups()[$property];
if (isset($groups[$propertyName]) && is_array($groups[$propertyName])) {
$groups = $model->getGroups()[$propertyName];
}
$annotationsReader->updateProperty($reflectionProperty, $property, $groups);