ID:               48004
 User updated by:  daniel dot mueller at inexio dot net
 Reported By:      daniel dot mueller at inexio dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: FreeBSD 7.1-RELEASE
 PHP Version:      5.3.0RC1
 New Comment:

The problem also exists in the latest CVS snapshot from today.


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

[2009-04-17 16:52:40] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



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

[2009-04-17 11:27:53] daniel dot mueller at inexio dot net

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 this bug report at http://bugs.php.net/?id=48004&edit=1

Reply via email to