From:             info at rhalff dot com
Operating system: debian
PHP version:      5CVS-2005-03-31 (dev)
PHP Bug Type:     Feature/Change Request
Bug description:  wrong error message assigning to $this

Description:
------------
The error message when assigning to $this is kinda misleading. It seems to
default to cannot re-assign $this even when not in object context.

Maybe it could be defaulted to some kind of error message stating $this is
a reserved variable name which can only be used in object context.





Reproduce code:
---------------
<?php $this = ''; ?>

Expected result:
----------------
something else then cannot re-assign $this...

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

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

Reply via email to