Bug #16355 Updated: Session_destroy() doesn't work

From: Date: Wed, 03 Apr 2002 03:05:43 +0000
Subject: Bug #16355 Updated: Session_destroy() doesn't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-3871@lists.php.net to get a copy of this message
ID: 16355 Updated by: yohgaki@php.net Reported By: betsyasm@yahoo.com Status: Bogus Bug Type: Session related Operating System: Linux Redhat 7.1 PHP Version: 4.1.2 New Comment: Yes. You cannot pass any parameter to session_destroy(). It was just ignoring where it should raise error. Now it raises error as it should. I've changed some internal functions so that functions that cannot take any parameter raise errors. It's one of them. There are some of functions that aren't fixed. Be careful ;) Previous Comments: ------------------------------------------------------------------------ [2002-04-02 21:18:50] betsyasm@yahoo.com Fix my code means to remove the parameter. My current code is: session_register("userid"); if ($userid!="") { my page code }else session_destroy("userid"); Should I leave session_destroy void? Thanks for your help ------------------------------------------------------------------------ [2002-04-02 09:34:12] yohgaki@php.net That's because you're passing parameter(s) to session_destroy. Old PHP didn't check pramater is passed or not even if it should check. You have to fix your code. ------------------------------------------------------------------------ [2002-03-29 17:57:43] betsyasm@yahoo.com I use apache 1.3.24/ php 4.1.2 /firebird with Red Hat 7.1 It used to work properly with php 4.0.5. When I installed php 4.1.2 I get the following error message: Wrong parameter count for session_destroy() and the session is not destroied Configure command: ./configure --with-interbase=/opt/interbase --with-apache=../apache_1.4.2 --enable-track-vars You can check it at www.g2k.es/factory/index.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16355&edit=1

« previous php.bugs (#3871) next »