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

Bug #13446 crash with src of phpMyAdmin
Submitted: 2008-03-20 12:25 UTC
From: cybot Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.0.1)
PHP Version: 5.2.5 OS: linux
Roadmaps: 1.1.0    
Subscription  


 [2008-03-20 12:25 UTC] cybot (Sebastian Mendel)
Description: ------------ uncaught exception on conditional class declarations Test script: --------------- :phpmyadmin # phpcs --report=checkstyle --standard=PEAR --ignore=tcpdf/,lang/ -v Actual result: -------------- Processing pdf.php [3412 tokens in 474 lines]... Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member var in /usr/share/php5/PEAR/PHP/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php on line 52 #0 /usr/share/php5/PEAR/PHP/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php(52): PHP_CodeSniffer_File->getMemberProperties(203) #1 /usr/share/php5/PEAR/PHP/CodeSniffer/Standards/AbstractVariableSniff.php(139): PEAR_Sniffs_NamingConventions_ValidVariableNameSniff->processMemberVar(Object(PHP_CodeSniffer_File), 203) #2 /usr/share/php5/PEAR/PHP/CodeSniffer/Standards/AbstractScopeSniff.php(178): PHP_CodeSniffer_Standards_AbstractVariableSniff->processTokenWithinScope(Object(PHP_CodeSniffer_File), 203, 190) #3 /usr/share/php5/PEAR/PHP/CodeSniffer/File.php(479): PHP_CodeSniffer_Standards_AbstractScopeSniff->process(Object(PHP_CodeSniffer_File), 203) #4 /usr/share/php5/PEAR/PHP/CodeSniffer.php(560): PHP_CodeSniffer_File->start() #5 /usr/share/php5/PEAR/PHP/CodeSniffer.php(514): PHP_CodeSniffer->proc in /usr/share/php5/PEAR/PHP/CodeSniffer/File.php on line 1918

Comments

 [2008-03-22 12:49 UTC] mapi (Manuel Pichler)
Here is reproducable code for this bug. <?php if (true) { class FooBar { var $foo = null; } } ?>
 [2008-03-25 21:15 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.