Closed GoogleCodeExporter closed 8 years ago
Thanks, Louis, for pointing to issue source. But general problem is that while
processing 'or' statement stack top contains 'null' value. This value remained
after unsuccessful lookup for beginning of 'section' statement and must be
removed before executing 'or' section. So fix should looks like this
///////////////////////////////////////////////////////////
public void execute(ScopedContext context, ITemplateRenderCallback callback) {
// push a context first
Object cursorPosition = context
.pushSection(this.block.getSectionName());
if (!context.isEmptyContext(cursorPosition)) {
TemplateExecutor.execute(this.block.getStatements(), context,
callback);
context.pop(); // leave as is
} else {
context.pop(); // add this line
TemplateExecutor.execute(this.block.getStatements("or"), context,
callback);
}
}
////////////////////////////////////////////////////////
Original comment by isungu...@issart.com
on 6 Mar 2012 at 7:31
Original comment by isungu...@issart.com
on 12 Mar 2012 at 8:40
Original comment by isungu...@issart.com
on 12 Mar 2012 at 9:46
Original issue reported on code.google.com by
louis...@rogers.com
on 23 Jul 2010 at 7:36