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

Bug #15519 Uncaught PHP_CodeSniffer_Exception
Submitted: 2009-01-05 22:07 UTC
From: wyrdvans Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: 5.2.4 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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 : 38 + 49 = ?

 
 [2009-01-05 22:07 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 aw_affiliate { var $ssl_public_pages = array('landing.htm', 'login.htm'); function __construct( ) { if( !empty($redirect) ) $this->{"__{$redirect}Redirect"}(); } } ?> 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(10) #1 /usr/share/php/PHP/CodeSniffer/Standards/AbstractVariableSniff.php(1 54): Zend_Sniffs_NamingConventions_ValidVariableNameSniff- >processMemberVar(Object(PHP_CodeSniffer_File), 10) #2 /usr/share/php/PHP/CodeSniffer/Standards/AbstractScopeSniff.php(190 ): PHP_CodeSniffer_Standards_AbstractVariableSniff- >processTokenWithinScope(Object(PHP_CodeSniffer_File), 10, 1) #3 /usr/share/php/PHP/CodeSniffer/File.php(394): PHP_CodeSniffer_Standards_AbstractScopeSniff- >process(Object(PHP_CodeSniffer_File), 10) #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/shar in /usr/share/php/PHP/CodeSniffer/File.php on line 1885

Comments

 [2009-01-06 00:54 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.