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

Request #12969 Redundant code in FloodControl.php: mt_srand
Submitted: 2008-01-24 13:35 UTC
From: fractalizer Assigned: till
Status: Closed Package: HTTP_FloodControl (version 0.1.1)
PHP Version: 5.2.5 OS: Windows
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 : 6 - 2 = ?

 
 [2008-01-24 13:35 UTC] fractalizer (Vladislav Rastrusny)
Description: ------------ On line 270 of FloodControl.php there is a code: list($usec, $sec) = explode(' ', microtime()); mt_srand((float) $sec + ((float) $usec * 100000)); HTTP_FloodControl requires PHP 5.0.0 at least (information from package2.xml. PHP Manual says, that "As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically. " I guess these lines can be safely removed from source as they are now redundant.

Comments

 [2011-03-27 19:55 UTC] till (Till Klampaeckel)
-Status: Open +Status: Bogus
Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. If it's not broken, don't fix it.
 [2011-03-27 20:14 UTC] fractalizer (Vladislav Rastrusny)
I reported no bug in PEAR. I reported a bug in HTTP_FloodControl as the header of the bug report clearly states.
 [2011-03-27 20:18 UTC] till (Till Klampaeckel)
-Status: Bogus +Status: Closed -Assigned To: +Assigned To: till
This bug has been fixed in SVN. 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. Just talked this over with Helgi and removed the call after all.
 [2011-03-28 00:09 UTC] fractalizer (Vladislav Rastrusny)
Thank you for your attention.