#27659 [NEW]: Cannot re-assign $this
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)
- js at enradia dot com
- pollita@php.net#27659 [Opn->WFx]: Cannot re-assign $this
- js at enradia dot com#27659 [WFx]: Cannot re-assign $this
- pollita@php.net#27659 [WFx]: Cannot re-assign $this
- helly@php.net#27659 [WFx->Bgs]: Cannot re-assign $this
- jbeall at heraldic dot us#27659 [Com]: Cannot re-assign $this
- mlemos at acm dot org#27659 [Com]: Cannot re-assign $this
- drew at estara dot com#27659 [Com]: Cannot re-assign $this
- mschulznospam at qualserv dot net#27659 [Com]: Cannot re-assign $this
- shelever at ukrlink dot net#27659 [Com]: Cannot re-assign $this
- gschlossnagle@php.net#27659 [Bgs]: Cannot re-assign $this
- thejam at gmail dot com#27659 [Com]: Cannot re-assign $this