1 Mar 2009 10:58
Re: Repeat scope issue
Wow, this is really cool. Thanks alot! I had the thought to write about it to the mailing list too, but I thought that it should be that way because it is in PHP. No more tal:repeat="r_user users"! Kornel Lesiński wrote: > On 28.02.2009, at 00:41, Richard Cernava wrote: > >> I've noticed that PHPTal places the repeat value variable in the ctx >> object, which happens to be the same scope as all others >> assigned to view. > [...] >> I'm not sure if this is a bug or not considering standard php practice >> is to make these variables non local scope. I do feel in PHPTal that a >> repeat should have it's own local scope, at least for it's variable. >> >> What is the opinion on this? > > It's a bug. Each element should have its own scope, and assignment > inside tal:repeat shouldn't leak outside the loop. > > This is fixed in SVN. >
RSS Feed