Notice: Indirect modification of overloaded property ..

You get this because you have the __get method set up , and you are trying to access an array that is not declared.

class a {
 //      private $stuff = array();
 public function foo()
 {
     $this->stuff['asd'] = 'foo';
 }

 public function __get($name)
 {
     return null;
 }
$a = new a();
$a->foo();

The above code will result in :

Notice:  Indirect modification of overloaded property a::$stuff has no effect

I think this happens only for 5.2.x . More details here.

I encountered this bug while refactoring a set of classes. The property got lost from the parent , who had a __get method set , and was called from the child class.

This entry was posted on Tuesday, October 13th, 2009 at 2:54 pm and is filed under dev. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply