I am getting Parse error: syntax error, unexpected '', expecting endswitch (T_ENDSWITCH) or case (T_CASE) or default (T_DEFAULT) in ...
with the following code
<?php switch ($oEx->getCode()): ?>
<?php default: ?>
Stuff
<?php endswitch; ?>
Whereas this is OK
<?php switch ($oEx->getCode()):
endswitch; ?>
Why? A work around is to add a dummy-case as below before the closing tag but I can't see why this should be necessary.
<?php switch ($oEx->getCode()): case -9999: break; ?>
<?php default: ?>
Stuff
<?php endswitch; ?>