#27659 [NEW]: Cannot re-assign $this

From: Date: Tue, 23 Mar 2004 18:09:13 +0000
Subject: #27659 [NEW]: Cannot re-assign $this
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56678@lists.php.net to get a copy of this message
From:             js at enradia dot com
Operating system: linux 2.6.3
PHP version:      5.0.0RC1
PHP Bug Type:     Unknown/Other Function
Bug description:  Cannot re-assign $this

Description:
------------
When trying to reassign $this (from session data for 
example) I get an error: 
Fatal error: Cannot re-assign $this in... 
 
Code used: 
$this = unserialize($data); 
 
This works in php 4. Perhaps this is a feature change but 
I could not find a reference to any alternatives so I am 
submitting a bug just in case. 
 
Thanks! 
Joshua 

Reproduce code:
---------------
$this = unserialize($data);

Expected result:
----------------
Assignment of session or serialized data to $this object 

Actual result:
--------------
Fatal error: Cannot re-assign $this in... 
 

-- 
Edit bug report at http://bugs.php.net/?id=27659&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27659&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27659&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27659&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27659&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27659&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27659&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27659&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27659&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27659&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27659&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27659&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27659&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27659&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27659&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27659&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27659&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27659&r=float


Thread (12 messages)

« previous php.bugs (#56678) next »