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

Bug #15336 Notice: Undefined offset: 2 in /usr/share/php/PHP/CodeSniffer/File.php on line
Submitted: 2008-12-17 21:16 UTC
From: doconnor Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-12-17 21:16 UTC] doconnor (Daniel O'Connor)
Description: ------------ Notice: Undefined offset: 2 in /usr/share/php/PHP/CodeSniffer/File.php on line 517 Run against the Translation package from CVS. Test script: --------------- clockwerx@clockwerx-desktop:~$ phpcs --report=xml pear/Translation Expected result: ---------------- Well formed XML Actual result: -------------- Notice: Undefined offset: 2 in /usr/share/php/PHP/CodeSniffer/File.php on line 517 Call Stack: 0.0005 51436 1. {main}() /usr/bin/phpcs:0 0.0465 1155688 2. PHP_CodeSniffer_CLI->process() /usr/bin/phpcs:30 0.0477 1159484 3. PHP_CodeSniffer->process() /usr/share/php/PHP/CodeSniffer/CLI.php:389 0.1272 2748004 4. PHP_CodeSniffer->processFiles() /usr/share/php/PHP/CodeSniffer.php:333 2.1261 5788316 5. PHP_CodeSniffer_File->addError() /usr/share/php/PHP/CodeSniffer.php:635

Comments

 [2008-12-17 22:38 UTC] squiz (Greg Sherwood)
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. Was actually a problem with a sniff not resetting itself after each run. You would have also got a nice big error message on one of your files that looked like this: -------------------------------------------------------------------------------- FOUND 1 ERROR(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 1 | ERROR | An error occurred during processing; checking has been aborted. | | The error message was: Token type is not T_FUNCTION, T_CLASS OR | | T_INTERFACE -------------------------------------------------------------------------------- Should be fixed now though.