Symfony – using isset on sfOutputEscaperObjectDecorator

August 18th, 2011 § 0 comments

Have you tried isset function on doctine object from  template? Something like this?

   If you tried this you will know that isset will return only false. Because the Doctrine Object is wrapped with sfOutputEscaperObjectDecorator. So if you like to check the presence of a property then you should use something like this.

Happy coding

Revath S Kumar [RSK]

- Rubyist / JavaScripter - Yeoman Team member - Open source enthusiast - Blogger @ PHPRepo and - Coder @ Whatznear - Google fanboy - jQuery lover

More Posts - Website - Twitter - Facebook - LinkedIn - Pinterest - Google Plus - YouTube