Flatten fails for recursive objects
ponychicken opened this issue · comments
I'm trying to use this renderer together with Kirby CMS.
When I use a construct like
meta(name='description', content=$site->description())
Kirby returns not a string, but a class instance which has a custom __toString method set, expecting that a renderer would do something like echo $site->description()
.
Unfortunately this renderer tries to flatten the object, which is impossible for an object with a circular reference.
Yup, good find. I'll invoke __toString if available, fixing probably today.
Thanks for your PR, I merged it and that should fix this.