From: jw at jwscripts dot com Operating system: Windows XP PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Crash when __ToString() called from object with undefined property
Description: ------------ When the __toString() method is called from a returned object to return an undefined property, Apache 2.0.48 crashes. Reproduce code: --------------- <? class Foo { public function doSomething() { return new Foo; } public function __toString () { return $this->undefined; } } $foo = new Foo; print $foo->doSomething(); ?> Expected result: ---------------- Notice: Undefined property: Foo::$undefined Fatal error: Method Foo::__toString() must return a string value Actual result: -------------- Apache Crash: ============= szAppName : Apache.exe szAppVer : 2.0.48.0 szModName : php5ts.dll szModVer : 5.0.1.1 offset : 0004dd7f + the above messages -- Edit bug report at http://bugs.php.net/?id=30112&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30112&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30112&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30112&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30112&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30112&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30112&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30112&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30112&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30112&r=support Expected behavior: http://bugs.php.net/fix.php?id=30112&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30112&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30112&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30112&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30112&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30112&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30112&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30112&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30112&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30112&r=mysqlcfg