#34887 [Opn->Bgs]: null variables after session_destroy

From: Date: Mon, 17 Oct 2005 06:05:49 +0000
Subject: #34887 [Opn->Bgs]: null variables after session_destroy
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86631@lists.php.net to get a copy of this message
ID: 34887 Updated by: derick@php.net Reported By: dedalo at doramail dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Linux Fedora Core 4 x86_64 PHP Version: 5.0.5 New Comment: Not a bug, so we mark it bogus. Previous Comments: ------------------------------------------------------------------------ [2005-10-17 03:26:32] dedalo at doramail dot com This is not a bug. I have used session_unset and session_destroy all together. ------------------------------------------------------------------------ [2005-10-17 03:12:57] dedalo at doramail dot com Description: ------------ I have this code: session_start(); $_SESSION['myvariable'] = 'Hi all'; $temp = $_SESSION['myvariable']; session_unset(); session_destroy(); echo $temp; The output is null. The variable $temp is not valid more. I think this is a bug because is assigned by value and not by reference. register_globals is on Reproduce code: --------------- session_start(); $_SESSION['myvariable'] = 'Hi all'; $temp = $_SESSION['myvariable']; session_unset(); session_destroy(); echo $temp; Expected result: ---------------- Hi all Actual result: -------------- null ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34887&edit=1

« previous php.bugs (#86631) next »