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

Bug #16424 SubversionPropertiesSniff print PHP Warning
Submitted: 2009-07-10 14:38 UTC
From: ged Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.0RC3)
PHP Version: 5.2.5 OS: Any
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 : 2 + 36 = ?

 
 [2009-07-10 14:38 UTC] ged (Reto Stadler)
Description: ------------ The class Generic_Sniffs_VersionControl_SubversionPropertiesSniff work i expected. But this class prints a PHP waring if the '.svn-base' file has a key with a zero-length value. Test script: --------------- Content of .svn-base: K 12 svn:keywords V 2 Id K 13 svn:mergeinfo V 0 END Expected result: ---------------- Run sniff without printing the warning. Prevent to exectue the fread() command when substr($buffer, 2) is 0. Actual result: -------------- PHP Warning: fread(): Length parameter must be greater than 0 in /Volumes/Big/Development/vi-tu/dev.vi- tu.com/_development/pear/PEAR/PHP/CodeSniffer/Standards/Generic/Sniff s/VersionControl/SubversionPropertiesSniff.php on line 150

Comments

 [2009-07-22 08:57 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
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.