diff --git a/lib/Document.php b/lib/Document.php index 02eaf13c..67b9fb87 100644 --- a/lib/Document.php +++ b/lib/Document.php @@ -188,7 +188,7 @@ public function createProperty(string $name, $value = null, ?array $parameters = if (is_null($class)) { // If a VALUE parameter is supplied, we should use that. - if (isset($parameters['VALUE'])) { + if (isset($parameters['VALUE']) && is_string($parameters['VALUE'])) { $class = $this->getClassNameForPropertyValue($parameters['VALUE']); if (is_null($class)) { throw new InvalidDataException('Unsupported VALUE parameter for '.$name.' property. You supplied "'.$parameters['VALUE'].'"');