ID:               42610
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php dot 20 dot zsh at spamgourmet dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5.2.4
 New Comment:

It is nearly impossible to track back references to this within the
code 
to detect attempts to circumvent normal overwrite limits.


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

[2007-09-10 12:00:49] php dot 20 dot zsh at spamgourmet dot com

Description:
------------
$this can be changed when you use an automagic function.

Reproduce code:
---------------
<?php
function change(&$var, $value) {
        $var = $value;
        return true;
}
class foo {
        function __construct() {
                change($this, false);
                var_dump($this);
        }
}
$foo = new foo;
?>


Expected result:
----------------
HTTP/1.1 500 Internal Server Error

Fatal error: Cannot re-assign $this in %s on line %d


Actual result:
--------------
HTTP/1.1 200 OK

bool(false)



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


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

Reply via email to