Bug #9360

ObjectSerializer does not detect recursion in object references

Added by Robert Lemke over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Start date:
2010-08-18
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Given the following object relations:


        $objectA = new $className();
        $objectB = new $className();

        $objectA->child = $objectB;
        $objectB->parent = $objectA;

On trying to serialize $objectA with serializeObjectAsPropertyArray(), the object serializer will end up in an infinite loop trying to recursively serialize the two objects.

#1

Updated by Karsten Dambekalns over 10 years ago

  • Category changed from MVC - Routing to Object
#2

Updated by Robert Lemke over 10 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r5009.

Also available in: Atom PDF