#48004 [NEW]: Error handler prevents creation of default object

From: Date: Fri, 17 Apr 2009 11:27:54 +0000
Subject: #48004 [NEW]: Error handler prevents creation of default object
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135923@lists.php.net to get a copy of this message
From: daniel dot mueller at inexio dot net Operating system: FreeBSD 7.1-RELEASE PHP version: 5.3.0RC1 PHP Bug Type: Scripting Engine problem Bug description: Error handler prevents creation of default object Description: ------------ The creation of a default object from an empty value triggers a warning with level E_STRICT. If an error handler catches this warning, in some cases the automatic initialization of the object fails. Without error handler, everything works as expected. Affected versions: 5.3.0RC1, 5.3.0alpha3 Not affected: 5.2.x Reproduce code: --------------- <? function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { return true; } function test() { $data->id = 1; var_dump($data); } set_error_handler("error_handler"); test(); Expected result: ---------------- object(stdClass)#1 (1) { ["id"]=> int(1) } Actual result: -------------- NULL -- Edit bug report at http://bugs.php.net/?id=48004&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48004&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48004&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48004&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48004&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48004&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48004&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48004&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48004&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48004&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48004&r=support Expected behavior: http://bugs.php.net/fix.php?id=48004&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48004&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48004&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48004&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48004&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48004&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48004&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48004&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48004&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48004&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48004&r=mysqlcfg

« previous php.bugs (#135923) next »