Skip to content

Commit 988f08b

Browse files
committed
fix(jsonld): use http method instead of operation class
1 parent 99b54b1 commit 988f08b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/JsonLd/Serializer/ItemNormalizer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ public function denormalize(mixed $data, string $class, ?string $format = null,
177177
$context[self::OBJECT_TO_POPULATE] = $this->iriConverter->getResourceFromIri($data['@id'], $context + ['fetch_data' => true], $context['operation'] ?? null);
178178
} catch (ItemNotFoundException $e) {
179179
$operation = $context['operation'] ?? null;
180-
if ($operation instanceof HttpOperation && !($operation->getMethod() === 'PUT' && ($operation->getExtraProperties()['standard_put'] ?? false))) {
180+
181+
if (!($operation?->getMethod() === 'PUT' && ($operation?->getExtraProperties()['standard_put'] ?? false))) {
181182
throw $e;
182183
}
183184
}

0 commit comments

Comments
 (0)