ID: 39681 Updated by: [EMAIL PROTECTED] Reported By: mail at jorgenhorstink dot nl Status: Open Bug Type: Class/Object related Operating System: FreeBSD PHP Version: 4.4.4 New Comment:
In PHP 5.3: Fatal error: Using $this when not in object context Previous Comments: ------------------------------------------------------------------------ [2006-11-29 11:55:10] mail at jorgenhorstink dot nl Description: ------------ The code below shows the issue. Reproduce code: --------------- <?php $this->bug = 'PHP Should not allow assignment of $this properties when used outside a class'; class A { function B() { } } A::B(); ?> Expected result: ---------------- The engine should throw an error because setting a property on the $this object is senseless. Actual result: -------------- Warning: Problem with method call - please report this bug in xxx.php on line xx ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39681&edit=1