cresus18 6 years ago • updated by Alex van der Vegt 5 years ago 3
I have noticed a new bug introduced with the latest build 2181 which is rather annoying.

Suppose you were to type some PHP interlaced in some HTML, with some levels of indentation, as follows:

<div clas="level-1">
    <div class="level-2">
        <?php if(true): ?>
        <?php elseif(false): ?>
        <?php else: ?>
        <?php endif; ?>

When you close the PHP after 'elseif', 'else', or 'endif', it un-indent the line automatically by removing one tab.

This doesn't happen for the 'if', but also happens when using 'endforeach' and endwhile', and probably other similar PHP condition keywords.

This bug doesn't occur if you were to use curly brackets '{ }' instead of semi-colons ':'.
For whoever who are so quick to vote against this bug, could you please explain why? If it's not a bug, is there some kind of setting to prevent this behaviour? Or do you simply not want to see this bug fixed one day? I'd be pretty interested to have your comments. Thanks


Did somebody maybe find the solution/workaround for this behaviour? I have the same problem.


I am facing this issue also. Very annoying when write wordpress or magento code.