From 3cf6669c4ed9da9421cd53211324a8ae6dfb6363 Mon Sep 17 00:00:00 2001 From: Martijn van Kekem Date: Wed, 17 Jan 2024 15:45:42 +0100 Subject: [PATCH] Check for string-type parameter VALUE --- lib/Document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'].'"');