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

Doc Bug #13855 Sample in documentation incorrect
Submitted: 2008-05-08 16:22 UTC
From: rek Assigned: till
Status: Closed Package: HTTP_Session2 (version 0.7.2)
PHP Version: 5.2.6 OS: Debian
Roadmaps: 0.7.3    
Subscription  


 [2008-05-08 16:22 UTC] rek (Rene Keller)
Description: ------------ Page: http://pear.php.net/manual/en/package.http.http-session2.intro.php Sample current Version: HTTP_Session2::setExpire(time() + 60 * 60); // expires in one hour HTTP_Session2::setIdle(time() + 10 * 60); // idles in ten minutes Sample corrected Version: HTTP_Session2::setExpire(60 * 60); // expires in one hour HTTP_Session2::setIdle(10 * 60); // idles in ten minutes Note: Current Timestamp should not beeing added when setting Expire and Idle, as it is added when isExpired() or isIdle is called (compare Session2.php, lines 389-390 and 409-410). Thanks for your great work! rék

Comments

 [2008-05-08 22:35 UTC] till (Till Klampaeckel)
Thanks for the report, I'll take care of it shortly.
 [2008-09-16 13:14 UTC] till (Till Klampaeckel)
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. This obviously took a while, sorry about that. The manual is rebuild weekly, so it'll be corrected next weekend/early next week.
 [2010-04-01 16:15 UTC] marcmerz (Marcus Merz)
Eventhough it was mentioned that the documentation was fixed, you still find incorrect examples of HTTP_Session2::setExpire( time() + <abc> ); HTTP_Session2::setIdle( time() + <xyz> ); on http://pear.php.net/manual/en/package.http.http-session2.intro.php and the following pages. Even in Session2.php (line 89) there is this: HTTP_Session2::setExpire(time() + 60 * 60); // expires in one hour which is wrong as for both setExpire and SetIdle you have to give the number of seconds for the respective item.