Skip to content

Commit 9f85db9

Browse files
committed
Merge pull request #639 from RonXS/master
[FEATURE] Use static instantiation with max depth check
2 parents ad37a28 + 78db0b9 commit 9f85db9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Serializer/Callback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function setVersion($version)
4343

4444
public function serialize($object)
4545
{
46-
$context = $this->serializer instanceof SerializerInterface ? new SerializationContext() : array();
46+
$context = $this->serializer instanceof SerializerInterface ? SerializationContext::create()->enableMaxDepthChecks() : array();
4747

4848
if ($this->groups) {
4949
$context->setGroups($this->groups);

0 commit comments

Comments
 (0)