From: dennis at inmarket dot lviv dot ua Operating system: WinXP PHP version: 5.0.0RC2 PHP Bug Type: Class/Object related Bug description: "Cannot access undefined property for object with overloaded property access"
Description: ------------ "Cannot access undefined property for object with overloaded property access" is an error when I try to set a property of an instance, which, in turn, is a property of another instance of an overloaded class, i.e. $a->x->y = 2 triggers the error if $a is an instance of an overloaded class. Note that getting that property works fine. Reproduce code: --------------- class Object { public $x; function __construct($x) { $this->x = $x; } } class Overloaded { var $props; function __construct($x) { $this->x = new Object($x); } function __get($prop) { return $this->props[$prop]; } function __set($prop, $val) { $this->props[$prop] = $val; } } $y = new Overloaded(2); echo $y->x->x, " "; // Prints 2... echo $y->x->x = 3; //Should print 3... Expected result: ---------------- 2 3 Actual result: -------------- 2 Fatal error: Cannot access undefined property for object with overloaded property access in path/to/script.php on line 22 -- Edit bug report at http://bugs.php.net/?id=28444&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28444&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28444&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28444&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28444&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28444&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28444&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28444&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28444&r=support Expected behavior: http://bugs.php.net/fix.php?id=28444&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28444&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28444&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28444&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28444&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28444&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28444&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28444&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28444&r=float