Bug #14571 Updated: setcookie behavoir changed in 4.1 from previous versions

From: Date: Tue, 18 Dec 2001 08:48:17 +0000
Subject: Bug #14571 Updated: setcookie behavoir changed in 4.1 from previous versions
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-74220@lists.php.net to get a copy of this message
ID: 14571 Updated by: sander Reported By: smclean@scoreinfo.tv Old Status: Open Status: Bogus Bug Type: Documentation problem Operating System: Linux PHP Version: 4.1.0 New Comment: This hasn't changed. setcookie('name','') doesn't remove the cookie, and it never did. To remove a cookie, use setcookie with a expire-date in the past, i.e. setcookie('name','', time()-10000). Previous Comments: ------------------------------------------------------------------------ [2001-12-17 21:36:35] smclean@scoreinfo.tv The behavoir of the setcookie function changed in 4.1.0 even though no such change was documented in the changelog. This had the effect of disabling an application of mine until I figured out what happened. In PHP <4.1.0, the code: setcookie("cookiename",""); would delete the cookie 'cookiename'. In PHP 4.1.0, this function created a cookie with a null value named cookiename. I know this is a rather silly change, and you wouldn't expect someone to ever specify a blank value in the second argument, but it did cause a short downtime in our website software. I posted this on the setcookie() manual page but it was rejected on grounds that it was more of a bug report than anything, so I thought I'd post it here. Thanks Sean ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14571&edit=1

« previous php.dev (#74220) next »