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

Bug #15661 Uncaught PHP_CodeSniffer_Exception
Submitted: 2009-01-16 19:49 UTC
From: wyrdvans Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: 5.2.4 OS: Linux
Roadmaps: (Not assigned)    

 [2009-01-16 19:49 UTC] wyrdvans (Jason Schadel)
Description: ------------ Both PEAR and Zend standards produce a fatal error when the test script is sniffed with the following command: phpcs -n --standard=Zend test.php See the Actual result for the Zend error. Test script: --------------- <?php class ImapSource extends DataSource { function connect() { $this->connection = imap_open("{{$config['host']}:{$config['port']}/{$config['connect']}}{$config['mailbox']}", $config['login'], $config['password']); $list = imap_getmailboxes($this->connection, "{{$config['host']}}", "*"); } } Actual result: -------------- $ phpcs -n -v --standard=PEAR test.php Registering sniffs in PEAR standard... DONE (26 sniffs registered) Processing test.php [34 tokens in 8 lines]... Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member var in /usr/share/php/PHP/CodeSniffer/Standards/PEAR/Sniffs/NamingConven tions/ValidVariableNameSniff.php on line 51 #0 /usr/share/php/PHP/CodeSniffer/Standards/PEAR/Sniffs/NamingConven tions/ValidVariableNameSniff.php(51): PHP_CodeSniffer_File- >getMemberProperties(21) #1 /usr/share/php/PHP/CodeSniffer/Standards/AbstractVariableSniff.php(1 54): PEAR_Sniffs_NamingConventions_ValidVariableNameSniff- >processMemberVar(Object(PHP_CodeSniffer_File), 21) #2 /usr/share/php/PHP/CodeSniffer/Standards/AbstractScopeSniff.php(190 ): PHP_CodeSniffer_Standards_AbstractVariableSniff- >processTokenWithinScope(Object(PHP_CodeSniffer_File), 21, 1) #3 /usr/share/php/PHP/CodeSniffer/File.php(394): PHP_CodeSniffer_Standards_AbstractScopeSniff- >process(Object(PHP_CodeSniffer_File), 21) #4 /usr/share/php/PHP/CodeSniffer.php(708): PHP_CodeSniffer_File- >start(NULL) #5 /usr/share/php/PHP/CodeSniffer.php(335): PHP_CodeSniffer- >processFile('/mnt/hgfs/trunk...') #6 /usr/share/ in /usr/share/php/PHP/CodeSniffer/File.php on line 1883


 [2009-01-20 23:55 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.