diff --git a/lib/Document.php b/lib/Document.php index b311987d..ac2a05f4 100644 --- a/lib/Document.php +++ b/lib/Document.php @@ -190,7 +190,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'].'"');