Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3276203

Browse files
committed
[Serializer] Check the value of enable_max_depth if defined
1 parent 985ef53 commit 3276203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ private function updateData(array $data, $attribute, $attributeValue)
332332
private function isMaxDepthReached(array $attributesMetadata, $class, $attribute, array &$context)
333333
{
334334
if (
335-
!isset($context[static::ENABLE_MAX_DEPTH]) ||
335+
(!isset($context[static::ENABLE_MAX_DEPTH]) || !$context[static::ENABLE_MAX_DEPTH]) ||
336336
!isset($attributesMetadata[$attribute]) ||
337337
null === $maxDepth = $attributesMetadata[$attribute]->getMaxDepth()
338338
) {

0 commit comments

Comments
 (0)