note 17528 rejected from function.setcookie by zak
| From: | zak@php.net | Date: | Thu, 13 Dec 2001 05:30:18 +0000 |
| Subject: | note 17528 rejected from function.setcookie by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22570@lists.php.net to get a copy of this message | ||
The behavoir of setcookie changed between php 4.0 and php 4.1, though no documentation that comes
with 4.1 reflects this change.
Previously, with < 4.1, if you ran 'setcookie("cookiename","")' it
would delete the cookie named cookiename exactly as if you ran
'setcookie("cookiename")'.
With 4.1, when you run 'setcookie("cookiename","")', a cookie named
cookiename with a null value is set.
Paradoxically, if you run
'setcookie("cookiename","","","/","domain.com")'
the cookie matching the path and domain arguments is deleted.
Annoying incosistency, I wonder why they changed it.
I wish they would have documented this in the changelog, as it ended up breaking our login system
for 30 minutes or so while I debugged.