Hi,
i found a nice bug (that keeps me awake for about 3 hours...) I have the following template: <tmpl_if expr="(int(rand(2))==0"> YES <tmpl_else> NO </tmpl_if> which is not that complicated.When you run the program, and the expr is evaluated to FASLSE then there is no problem and you get
NO in the outut.BUT (!) if the expr is TRUE then the document is parsed again (don't ask why) and now comes the clue. IF the expr on the second run returns the same result as on the first run, you will get
YES but if the results are different on the two runs you will get YES NO ... Whoops. Any Ideas?It seems not to be a problem with the rand, it seems more to be a problem when the expr is somehow different in the two runs.
So why is ist pared twice? (sometimes!)
test.tgz
Description: Binary data