Arbit - project tracking

Dwoo

#64: Weird foreach behaviour

Issue revisions

  • new by Stephan Wentz at 2010-M-19 14:14
  • feedback by Jordi Boggiano at 2010-M-08 19:12
  • closed by Jordi Boggiano at 2011-F-15 0:21
Type bug bug
State closed closed
Priority high high
Resolution none none
Assigned to Nobody
Scheduled for
Affected versions 1.1.1
Affected components Plugins
Last change Tuesday 15 February 2011 00:21:57 UTC by Jordi Boggiano

Test case will be submitted soon [tm]

  • Stephan Wentz at Friday 19 March 2010 14:24:32 UTC

    Weird behaviour in a case where a named foreach is used. There was a comment {* $dwoo.foreach.whatever.last *} in the code, and as soon as this comment was removed, $dwoo.foreach.whatever.last and the other information was empty.

  • Jordi Boggiano at Saturday 8 May 2010 19:12:34 UTC

    This happened with extends or something like that right? I mean, the foreach plugin looks in the source of the current template if the variables are used or not so it doesn't compute all that crap for nothing.. Obviously if you use them in another template somehow it gets tricky to detect. If that's the case, I'd recommend working around it either with the comment trick or via {$last = $dwoo.foreach.whatever.last} which is more explicit. I can't really fix this without harming performances sorry.