Thursday, April 17, 2008

Beware of var_dump in Drupal nodes

Just had a scare when my Drupal site started showing weird stuff half-way through printing a view. Turns out that I left commented var_dump($node) in the code and the contents had an "appropriate" mix of comments and HTML that cause the comment to break and spill-over into the page.

Lesson learnt: keep them template files nice and tidy and leave the debug info for the development server. Hm, like that's new anyways? :)

No comments: