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.
When a PHP page ends with non-PHP code such as <script> or <style>, the final ?> before those tags is flagged as unnecessary, but in fact it *is* necessary. Using a <div> as the first tag following ?> removes the warning. so I assume the editor is checking for certain tags or text. <?php ?> <!-- flagged --> <script> var foo = 5; </script> <?php ?> <!-- flagged --> <style> .foo {} </style> <?php ?> <!-- not flagged --> xxx <script> var foo = 5; </script> <?php ?> <!-- not flagged --> <div>foo</div> I recommend having the warning *only* when it ends the file or is followed by whitespace characters only.
Also, the description text for the hint is not quite standard English. Replace the first sentence It is a good practise to don't use closing PHP delimiter at the end of file. with It is a good practise to omit the closing PHP delimiter at the end of the file.
<script> will probably be considered as a JS token. I'll look at it, thanks. I'll improve message as well.
Hmm...I copypasted your code into a PHP file and I don't see any "Unnecessary closing dellimiter" hint :/ Can you attach a sample file, where it can be reproduced? Thanks. English fixed in web-main #1b338e761370
@obrejla: Ondreji, copy and paste just this (without comments): <?php ?> <script> var foo = 5; </script> or this: <?php ?> <style> .foo {} </style>
Yep, reproducible, thanks.
Fixed in web-main #812c81be997b
Verified, thanks. Product Version: NetBeans IDE Dev (Build 201311040001) Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Transplanted to release74 branch in releases repo. Please, verify, thanks.
Verified. Product Version: NetBeans IDE 7.4 (Build 201311111738) Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)