#39775 [Asn->Csd]: "Indirect modification ..." message is not shown

From: Date: Fri, 08 Dec 2006 17:46:09 +0000
Subject: #39775 [Asn->Csd]: "Indirect modification ..." message is not shown
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106100@lists.php.net to get a copy of this message
ID: 39775 Updated by: dmitry@php.net Reported By: toomuchphp-phpbugs at yahoo dot com -Status: Assigned +Status: Closed Bug Type: Class/Object related Operating System: OS X PHP Version: 5.2.0 Assigned To: dmitry New Comment: Fixed in CVS HEAD and PHP_5_2. Previous Comments: ------------------------------------------------------------------------ [2006-12-08 01:03:30] toomuchphp-phpbugs at yahoo dot com Description: ------------ If a __get() method returns a variable which is a reference, the 'Indirect modification of ...' error will not be shown. Reproduce code: --------------- class test { var $array = array(); function __get($var) { $v =& $this->array; return $this->array; } } $t = new test; $t->anything[] = 'bar'; print_r($t->anything); Expected result: ---------------- Notice: Indirect modification of overloaded property test::$anything has no effect in test.php on line 10 Array ( ) Actual result: -------------- Array ( ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39775&edit=1

« previous php.bugs (#106100) next »