ID: 24908 Updated by: [EMAIL PROTECTED] Reported By: itotakas at msu dot edu -Status: Verified +Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2003-11-29 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Seems to be fixed. Previous Comments: ------------------------------------------------------------------------ [2003-08-11 14:11:24] [EMAIL PROTECTED] Also see #24914 ------------------------------------------------------------------------ [2003-08-10 22:28:15] [EMAIL PROTECTED] The problem will occur when any super global is used from within __destruct. Here is a simpler example: <?php class test { function __destruct() { print_r($_ENV); } } $test = new test(); ?> ------------------------------------------------------------------------ [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