From 79e9b3b6ca67e168bea5f9125a6f970ce019176b 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 6f87b5b97..94815715a 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'].'"');