Skip to content

Commit 2b9e613

Browse files
committed
fix(jsonld): check if supportedTypes exists
1 parent 6bf894f commit 2b9e613

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/JsonLd/Serializer/ErrorNormalizer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public function supportsNormalization(mixed $data, ?string $format = null, array
5858

5959
public function getSupportedTypes(?string $format): array
6060
{
61-
return $this->inner->getSupportedTypes($format);
61+
if (method_exists($this->inner, 'getSupportedTypes')) {
62+
return $this->inner->getSupportedTypes($format);
63+
}
64+
65+
return [];
6266
}
6367
}

0 commit comments

Comments
 (0)