Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Bug #16170 Undefined Offset -1 in MultiLineConditionSniff.php on line 68
Submitted: 2009-05-02 18:25 UTC
From: lukas_schroeder Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.0RC1)
PHP Version: 5.2.5 OS: MacOSX10.5
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 10 + 7 = ?

 
 [2009-05-02 18:25 UTC] lukas_schroeder (Lukas Schroeder)
Description: ------------ . Test script: --------------- <?php if (isset($param)) { ?> <h3>some text</h3> <?php } ?> Expected result: ---------------- I expect not to see the notice ;) Actual result: -------------- Notice: Undefined offset: -1 in /opt/local/lib/php/PHP/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php on line 68 Call Stack: 0.0004 56212 1. {main}() /opt/local/bin/phpcs:0 0.0184 1100816 2. PHP_CodeSniffer_CLI->process() /opt/local/bin/phpcs:30 0.0202 1105268 3. PHP_CodeSniffer->process() /opt/local/lib/php/PHP/CodeSniffer/CLI.php:389 0.0721 2506556 4. PHP_CodeSniffer->processFile() /opt/local/lib/php/PHP/CodeSniffer.php:335 0.0724 2508860 5. PHP_CodeSniffer_File->start() /opt/local/lib/php/PHP/CodeSniffer.php:708 0.0823 2590724 6. PEAR_Sniffs_ControlStructures_MultiLineConditionSniff->process() /opt/local/lib/php/PHP/CodeSniffer/File.php:394

Comments

 [2009-05-02 18:25 UTC] lukas_schroeder (Lukas Schroeder)
The following patch has been added/updated: Patch Name: MultiLineSniff Revision: 1241270750 URL: http://pear.php.net/bugs/patch-display.php?bug=16170&patch=MultiLineSniff&revision=1241270750&display=1
 [2009-05-05 12:08 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.