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

Bug #12773 Reserved variables are not detected in strings
Submitted: 2007-12-25 18:28 UTC
From: wloche Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.0.0)
PHP Version: 5.2.5 OS: Win XP SP2
Roadmaps: 1.0.1    
Subscription  


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 : 15 + 28 = ?

 
 [2007-12-25 18:28 UTC] wloche (Wilfried Loche)
Description: ------------ Reserved variables are correctly recognized when they are used externally bu not within strings. Test script: --------------- File: bogus.php <?php echo "{$_SERVER['HOSTNAME']}"; C:\Program Files\PHP\phpcs.bat --standard=Zend bogus.php Expected result: ---------------- FILE: ...R\PHP\CodeSniffer\Standards\Zend\Sniffs\NamingConventions\bogus.php.txt -------------------------------------------------------------------------------- FOUND 1 ERROR(S) AND 0 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 1 | ERROR | End of line character is invalid; expected "\n" but found "\r\n" -------------------------------------------------------------------------------- Actual result: -------------- FILE: ...R\PHP\CodeSniffer\Standards\Zend\Sniffs\NamingConventions\bogus.php.txt -------------------------------------------------------------------------------- FOUND 2 ERROR(S) AND 0 WARNING(S) AFFECTING 2 LINE(S) -------------------------------------------------------------------------------- 1 | ERROR | End of line character is invalid; expected "\n" but found "\r\n" 2 | ERROR | Variable "_SERVER" is not in valid camel caps format --------------------------------------------------------------------------------

Comments

 [2007-12-26 21:19 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. Thanks for the patch.
 [2008-01-01 13:21 UTC] wloche (Wilfried Loche)
Thx for your comment. I didn't looked at the CVS tree :( By the way, Happy new year!
 [2008-01-02 02:40 UTC] squiz (Greg Sherwood)
Actually, that comment meant that it is now fixed in CVS, after I have applied your patch. It's one of the default PEAR bug tracker messages. So thanks for finding it and fixing it for me. Hope you had a good new year.
 [2008-01-02 21:04 UTC] wloche (Wilfried Loche)
lol, thx for your answer. I'm affraid I had allready began to drink ;) Wilfried.