ID: 24908 User updated by: itotakas at msu dot edu Reported By: itotakas at msu dot edu Status: Open Bug Type: Session related Operating System: Win 2000 Pro SP4 PHP Version: 5CVS-2003-08-01 (dev) New Comment:
Description: ------------ $_SESSION variable should be "array" and "super global". However, within the __destrunct function, $_SESSION changes its value to the reference to the class which implements __destruct function. Reproduce code: --------------- <? session_start(); $_SESSION["test"] = "test string"; class test { function __destruct() { // $_SESSION = $this !? print_r($_SESSION); } } $test = new test; ?> Expected result: ---------------- Array ( [test] => test string ) Actual result: -------------- test Object ( ) Previous Comments: ------------------------------------------------------------------------ [2003-08-01 12:33:10] itotakas at msu dot edu Description: ------------ $_SESSION variable should be "array" and "super global". However, within the __destrunct function, $_SESSION changes its value to the reference to the class which implements __destruct function. [Example] <? session_start(); $_SESSION["test"] = "test string"; class test { function __destruct() { // $_SESSION = $this !? print_r($_SESSION); } } $test = new test; ?> [Expected result] Array ( [test] => test string ) [Actual result] test Object ( ) Reproduce code: --------------- <? session_start(); $_SESSION["test"] = "test string"; class test { function __destruct() { // $_SESSION = $this !? print_r($_SESSION); } } $test = new test; ?> Expected result: ---------------- Array ( [test] => test string ) Actual result: -------------- test Object ( ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24908&edit=1