This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
each else if is considered as else {if()...} what causes problems in indentation - see example below. workaround: use elseif - else if should be implemented as a special case anyway. <?php require_once("DBClass.php"); $db = new DB(); $db->_construct(); if (isset($_POST['ic_input'])) { $text = $_POST['ic_input']; if ($text == "") { return false; } else if (!is_numeric($text)) { echo "IC moze obsahovat len cisla!"; return false; } else if (strlen($text) < 8 ) { echo "Text je prilis kratky"; return false; } elseif (strlen($text) > 8 ) { echo "Text je prilis dlhy"; return false; } else { $db->testForExistingIC(''); return true; } } ?>
confirmed. The current behavior is correct judging by the syntax, but I agree that most users would expect the formatter to behave the same as in case of elseif
*** Issue 166504 has been marked as a duplicate of this issue. ***
*** Issue 167082 has been marked as a duplicate of this issue. ***
Upgrading to P2 due to a number of duplicates
*** Issue 172117 has been marked as a duplicate of this issue. ***
*** Issue 171782 has been marked as a duplicate of this issue. ***
fixed & unit tested http://hg.netbeans.org/web-main/rev/c4c17236550d
Integrated into 'main-golden', will be available in build *200909251401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c4c17236550d User: Tomasz Slota <tslota@netbeans.org> Log: #164381: else if is not recognized in the same way as elseif
verified in Product Version: NetBeans IDE 6.8 Beta (Build 200909281634) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
*** Issue 174282 has been marked as a duplicate of this issue. ***