ID: 50242
Updated by: [email protected]
Reported By: jussi at growvc dot com
-Status: Open
+Status: Assigned
Bug Type: Date/time related
-Operating System: Linux
+Operating System: *
-PHP Version: 5.2.11
+PHP Version: 5.2
-Assigned To:
+Assigned To: derick
New Comment:
Happens only in PHP_5_2 branch.
Previous Comments:
------------------------------------------------------------------------
[2009-11-20 13:16:28] jussi at growvc dot com
Description:
------------
It seems that calling the DateTime class constructor causes an error
accumulated in error_get_last() to be cleared.
I am using a 64bit Linux (Ubuntu 9.10) with PHP 5.2.11 built by
dotdeb.org (unfortunately phpinfo() of their version doesn't give up
configure options). The problem reproduces with a default php.ini,
both as Apache module and on CLI.
I was also able do reproduce this on another system with another PHP
version (5.2.9, also a dotdeb build).
Reproduce code:
---------------
@trigger_error('foo');
echo (is_array(error_get_last())?'Error':'No error') . "\n";
$dt = new DateTime();
echo (is_array(error_get_last())?'Error':'No error') . "\n";
Expected result:
----------------
Error
Error
Actual result:
--------------
Error
No error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50242&edit=1