ID: 39775
Updated by: [EMAIL PROTECTED]
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