From e0ce82f8ad7507ab57149fde0d74e5d12a59f08f Mon Sep 17 00:00:00 2001 From: Guilhem N Date: Wed, 14 Feb 2018 13:51:06 +0100 Subject: [PATCH] Fix ObjectDescriber --- ModelDescriber/ObjectModelDescriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModelDescriber/ObjectModelDescriber.php b/ModelDescriber/ObjectModelDescriber.php index 820d86f..2b273bd 100644 --- a/ModelDescriber/ObjectModelDescriber.php +++ b/ModelDescriber/ObjectModelDescriber.php @@ -71,7 +71,7 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar } $types = $this->propertyInfo->getTypes($class, $propertyName); - if (0 === count($types)) { + if (null === $types || 0 === count($types)) { throw new \LogicException(sprintf('The PropertyInfo component was not able to guess the type of %s::$%s', $class, $propertyName)); } if (count($types) > 1) {