silverstripe/sapphire — pull request #1750 by s-m (2013-04-10 14:23:42+00:00)
Title: BUG: Allow empty else- and else_if-blocks

This fix allows empty else and else-if-blocks to be processed, fixes #1660.

This fix makes the matching of a template inside else_if and else-blocks optional and thereby allows empty else and else-if-blocks.
To facilitate this, the processing of these blocks has to include an `isset($sub['Template'])` check, just like the if-block.

This includes some test cases that would fail without this fix as the parser would just stop processing the template...

Best regards,
s-m