Skip to content

Commit

Permalink
Check for string-type parameter VALUE
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvankekem committed Jan 17, 2024
1 parent a5df355 commit 3cf6669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Document.php
Expand Up @@ -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'].'"');
Expand Down

0 comments on commit 3cf6669

Please sign in to comment.