ID:               28144
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nick at blackisha dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: debian testing
 PHP Version:      4.3.4
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Appears to be fixed in 4.3.6 


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

[2004-04-25 14:24:44] nick at blackisha dot com

Description:
------------
When a class is instantiated globally, and assigned to a variable name
which is the same as a session variable, then the session variable get
overwritten with the class.

This may happen with non-class variables, but I am not sure.




Reproduce code:
---------------
changing $entrain to anything else (i.e. $entra) fixes the problem.

<?php
session_start();

$entrain = new entrainRuntime();

var_dump($_SESSION);

class entrainRuntime
{
    function entrainRuntime ()
    {
            $_SESSION['entrain'] = array();
    }
}

?>

Expected result:
----------------
array(1) {"entrain" => array(0) {}}

this happens the first time, expected



Actual result:
--------------
On subsequent refreshes:

array(1) {"entrain" => &bject(entrainruntime)(0) {}}


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


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

Reply via email to