Monday, April 8, 2013

Codeigniter 2 Template Render Doubling

I've been using This Template in my CI 2 app heavily.
And suddenly something happens very awkward today.
Everything seems rendered twice.

I've tried to var_dump in the Template.php line 549,
it returned me:
array
  '_scripts' => boolean false
  '_styles' => boolean false
  'header' => boolean false
  'content' => boolean false
  'footer' => string ' ' (length=1)
array
  '_scripts' => boolean false
  '_styles' => boolean false
  'header' => boolean false
  'content' => boolean false
  'footer' => string ' ' (length=1)

Then i add debug_backtrace(), a very handy func,
right before the var_dump. I was shocked since
render() func was called in one of my model,
was accidentally pasted.

Hope it helps

No comments: