Skip to content

Commit 67d4f44

Browse files
committed
Merge 3.2
2 parents 96cb378 + 2e2664c commit 67d4f44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Serializer/ItemNormalizer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ private function getComponents(object $object, ?string $format, array $context):
186186

187187
$relation['iri'] = $this->iriConverter->getIriFromResource($object, UrlGeneratorInterface::ABS_PATH, $operation, $childContext);
188188
$relation['operation'] = $operation;
189+
$cacheKey = null;
189190
}
190191

191192
if ($propertyMetadata->isReadableLink()) {
@@ -202,7 +203,7 @@ private function getComponents(object $object, ?string $format, array $context):
202203
}
203204
}
204205

205-
if (false !== $context['cache_key']) {
206+
if ($cacheKey && false !== $context['cache_key']) {
206207
$this->componentsCache[$cacheKey] = $components;
207208
}
208209

0 commit comments

Comments
 (0)