Fix ObjectDescriber

This commit is contained in:
Guilhem N 2018-02-14 13:51:06 +01:00 committed by GitHub
parent c048adf7b7
commit e0ce82f8ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {