In your code, only a view is returned. Yet the format class is called, indicating a conversion of some sort. Line 89 (in 1.6, in later versions that's a comment) is in the to_array() method, extracting data from an object. So my guess is you have a circular reference in an object somewhere, because if an object contains a property that is also an object, it will call to_array() on that again.