#34887 [Opn]: null variables after session_destroy
| From: | dedalo at doramail dot com | Date: | Mon, 17 Oct 2005 01:26:33 +0000 |
| Subject: | #34887 [Opn]: null variables after session_destroy | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86629@lists.php.net to get a copy of this message | ||
ID: 34887
User updated by: dedalo at doramail dot com
Reported By: dedalo at doramail dot com
Status: Open
Bug Type: Session related
Operating System: Linux Fedora Core 4 x86_64
PHP Version: 5.0.5
New Comment:
This is not a bug. I have used session_unset and session_destroy all
together.
Previous Comments:
------------------------------------------------------------------------
[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