ID:               32168
 User updated by:  KRomas at goldentele dot com
 Reported By:      KRomas at goldentele dot com
 Status:           Open
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      4.3.9
 New Comment:

There is a result for 3-rd file


Previous Comments:
------------------------------------------------------------------------

[2005-03-03 11:42:53] 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)
  }
}


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32168&edit=1

Reply via email to