|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-03-03 11:42 UTC] KRomas at goldentele dot com
Description:
------------
If we erase the $_SESSION and then make the reference to some session variable X, the value of X is recovering, ie not erased.
Configure Command:
./configure' '--prefix=/usr/local/apache' '--with-config-file-path=/usr/local/Zend/etc' '--enable-track-vars' '--with-apxs=/usr/local/apache/bin/apxs' '--with-gd' '--with-oci8=/oracle/8.1.7' '--enable-trans-sid' '--enable-sigchild' '--with-zlib' '--enable-sockets' '--with-zlib-dir=/usr/local/include' '--with-iconv' '--with-iconv-dir=/usr/local' '--disable-debug' '--with-sybase-ct=/usr/local/freetds'
Reproduce code:
---------------
Please run folow files in order:
1.php
<?
session_start();
$_SESSION = Array();
$_SESSION['a']['b'] = 1;
echo '<PRE>';
var_dump($_SESSION);
?>
2.php
<?
session_start();
$_SESSION = Array();
//unset($_SESSION['a']);
//session_unregister('a');
//$val = $_SESSION['a'];
$val = & $_SESSION['a'];
echo '<PRE>';
var_dump($_SESSION);
?>
3.php
<?
session_start();
echo '<PRE>';
var_dump($_SESSION);
?>
Expected result:
----------------
array(1) {
["a"]=>
&NULL
}
Actual result:
--------------
array(1) {
["a"]=>
&array(1) {
["b"]=>
int(1)
}
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 19:00:02 2025 UTC |
For now PHP Version is 4.3.11-dev (Linux) and there is the same error: array(1) { ["a"]=> &array(1) { ["b"]=> int(1) } } Win-version work perfectly however: array(1) { ["a"]=> NULL }Have you the same result array(1) { ["a"]=> &array(1) { ["b"]=> int(1) } } on Linux-version of PHP?