#38875 [Opn->Bgs]: no new variables possible after self::$var = $_SESSION

From: Date: Tue, 19 Sep 2006 06:17:57 +0000
Subject: #38875 [Opn->Bgs]: no new variables possible after self::$var = $_SESSION
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-102390@lists.php.net to get a copy of this message
 ID:               38875
 Updated by:       tony2001@php.net
 Reported By:      lagemann at x-wars dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Gentoo 3.3.6, ssp-3.3.6-1.0, pie
 PHP Version:      5.1.6
 New Comment:

.



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

[2006-09-18 23:40:09] judas dot iscariote at gmail dot com

yu cannot do this :

$var = $_SESSION;

or 

$_SESSION = array(1,2,3,4,5);

because $_SESSION loose it's "magical" atributes then. and that is, the
expected behaviuor.

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

[2006-09-18 22:22:19] lagemann at x-wars dot net

Description:
------------
I set a static class var to $_SESSION ($varname 
= 'SESSION'; self::$$varname = $_SESSION;) and after some 
method calls and requires no new variable can be set in a 
method of the class.

This problem occurs not if i set self::$$varname = 
&$_SESSION;

tested with php 5.1.4, 5.1.6 and php 5.2.0RC5-dev 
(php5.2-200609172030)

Reproduce code:
---------------
Some more lines than 20:

http://degola.de/phpbug/

Expected result:
----------------
in line 41 the variable $classArray have to be Array ()

Actual result:
--------------
no new variable can be set, see http://degola.de/phpbug/


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


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


Thread (4 messages)

« previous php.bugs (#102390) next »