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

Bug #14250 ArrayDeclarationSniff emit warnings at malformed array
Submitted: 2008-06-27 17:44 UTC
From: miau Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.1.0RC2)
PHP Version: 5.2.5 OS:
Roadmaps: 1.1.0    

 [2008-06-27 17:44 UTC] miau (Koji Ando)
Description: ------------ Warnings are displayed when sniffing a .php file that have malformed array format. It prevents phpUnderControl from reporting properly. Test script: --------------- ***** Begin of malformed_array.php <?php $foo = array(1 , 2); ***** End of malformed_array.php >phpcs --standard=Squiz malformed_array.php Expected result: ---------------- Notice: Undefined offset: -1 in D:\xampplite\php\pear\PHP\CodeSniffer\Standards \Squiz\Sniffs\Arrays\ArrayDeclarationSniff.php on line 344 FILE: D:\xampplite\php\malformed_array.php -------------------------------------------------------------------------------- *snip* Actual result: -------------- FILE: D:\xampplite\php\malformed_array.php -------------------------------------------------------------------------------- *snip*


 [2008-06-27 19:31 UTC] miau (Koji Ando)
I'm sorry. I mistook "Expected result" for "Actual result".
 [2008-06-30 05:26 UTC] squiz (Greg Sherwood)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.