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

Bug #15383 Uncaught PHP_CodeSniffer_Exception
Submitted: 2008-12-23 20:35 UTC
From: wyrdvans Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.1.0)
PHP Version: 5.2.4 OS: Linux
Roadmaps: (Not assigned)    

 [2008-12-23 20:35 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 test { public function pay($aId = 0, $invoiceId = 0) { $this->data['CreditCard']['card_num'] = `/home/aweber/scripts/ -d '{$creditCard['CreditCard']['encrypted_card_num']}'`; if ($this->data['Balance']['paymethod'] < 5) { $this->data['Balance']['paymethod'] = 'cc'; } } } ?> Actual result: -------------- Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member var in /usr/share/php/PHP/CodeSniffer/Standards/Zend/Sniffs/NamingConven tions/ValidVariableNameSniff.php on line 154 #0 /usr/share/php/PHP/CodeSniffer/Standards/Zend/Sniffs/NamingConven tions/ValidVariableNameSniff.php(154): PHP_CodeSniffer_File- >getMemberProperties(81) #1 /usr/share/php/PHP/CodeSniffer/Standards/AbstractVariableSniff.php(1 47): Zend_Sniffs_NamingConventions_ValidVariableNameSniff- >processMemberVar(Object(PHP_CodeSniffer_File), 81) #2 /usr/share/php/PHP/CodeSniffer/Standards/AbstractScopeSniff.php(170 ): PHP_CodeSniffer_Standards_AbstractVariableSniff- >processTokenWithinScope(Object(PHP_CodeSniffer_File), 81, 1) #3 /usr/share/php/PHP/CodeSniffer/File.php(380): PHP_CodeSniffer_Standards_AbstractScopeSniff- >process(Object(PHP_CodeSniffer_File), 81) #4 /usr/share/php/PHP/CodeSniffer.php(624): PHP_CodeSniffer_File- >start(NULL) #5 /usr/share/php/PHP/CodeSniffer.php(291): PHP_CodeSniffer- >processFile('/mnt/hgfs/trunk...') #6 /usr/shar in /usr/share/php/PHP/CodeSniffer/File.php on line 1653


 [2008-12-24 02:32 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.