ID:               24807
 Updated by:       [EMAIL PROTECTED]
 Reported By:      Bertrand dot Willm at laposte dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: Windows XP
 PHP Version:      5.0.0b1 (beta1)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Suggest you read ZEND_CHANGES :)


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

[2003-07-25 15:35:14] Bertrand dot Willm at laposte dot net

Description:
------------
I try to use the following notation:
$object->property1->property2 = 'value';
when property1 and property2 are properties we access trow __get and
__set methods.
calling __get with property1 return an object that defined __get and
__set methods.
but there is a warning explaining the object doesn't support property
references.


Reproduce code:
---------------
<?php
class CBaseClass {
   private $text = 'default';
   function __Get() {
      return $this->text;
   }
   function __Set($name, $value) {
      $this->text = $value;
   }
}
class CExtClass {
   private $baseObject;
   function __construct() {
      $this->baseObject = new CBaseClass();
   }
   function __Get() {
      return $this->baseObject;
   }
}
$extObject = new CExtClass();
echo $extObject->extProperty->baseProperty, '<br>';
$extObject->extProperty->baseProperty = 'new';
echo $extObject->extProperty->baseProperty, '<br>';
?>

Expected result:
----------------
default
new


Actual result:
--------------
default

Warning: This object doesn't support property references in
c:\sitesweb\www\test.php5 on line 22
default



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


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

Reply via email to