From 3b81fa4f2feb5d62c34d70dacd8a2f729c5f7cfc Mon Sep 17 00:00:00 2001 From: Yi Ping <7th.cubic.sg@gmail.com> Date: Mon, 18 Dec 2017 08:06:19 +0800 Subject: [PATCH] changes --- ModelDescriber/JMSModelDescriber.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ModelDescriber/JMSModelDescriber.php b/ModelDescriber/JMSModelDescriber.php index 84c7109..8c90739 100644 --- a/ModelDescriber/JMSModelDescriber.php +++ b/ModelDescriber/JMSModelDescriber.php @@ -95,10 +95,11 @@ class JMSModelDescriber implements ModelDescriberInterface, ModelRegistryAwareIn continue; } - if(empty($model->getGroups()) || !array_key_exists($name, $model->getGroups()) || !is_array($model->getGroups()[$name])) + if(!array_key_exists($name, $model->getGroups()) || !is_array($model->getGroups()[$name])) { $groups = $model->getGroups(); - else + } else { $groups = $model->getGroups()[$name]; + } $property->setRef(