Doc #80304 [NEW]: setCookie() doc has given expiry in sec, but shows it as minute
| From: | asteroidalaz at gmail dot com | Date: | Sun, 01 Nov 2020 11:00:07 +0000 |
| Subject: | Doc #80304 [NEW]: setCookie() doc has given expiry in sec, but shows it as minute | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-18065@lists.php.net to get a copy of this message | ||
From: asteroidalaz at gmail dot com
Operating system: Windows 10
PHP version: 7.4.12
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:setCookie() doc has given expiry in sec, but shows it as minute
Description:
------------
In the documentation of the setCookie() function the doc says that
setCookie()'s expiry param takes input as time() + some value, which is
in unix seconds, but in its example it takes time() + 60*60 *24 * 30 and
comments it as 30 day time perion but the time mentioned is 1/60 of that
time period, as it should multiply 60 more to it.
I found that this mistake was multiple time in the documentation, have a
look there. And Thanks for your awesome PHP.
Test script:
---------------
setCookie("name","value", "/", time() + 60*60 *24 * 30); # This is
1/60th of 30 days
#it should be
setCookie("name","value", "/", time() + 60*60 *24 * 30 * 60); # One
more
60 multiplied
--
Edit bug report at https://bugs.php.net/bug.php?id=80304&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80304&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80304&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80304&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80304&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80304&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80304&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80304&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80304&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80304&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80304&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80304&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80304&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80304&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80304&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80304&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80304&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80304&r=mysqlcfg