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 authored and phil-davis committed Feb 11, 2024
1 parent 7968406 commit 79e9b3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'].'"');
Expand Down

0 comments on commit 79e9b3b

Please sign in to comment.