|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-20 18:00 UTC] jani@php.net
[2010-03-07 14:15 UTC] derick@php.net
-Status: Assigned
+Status: Bogus
[2010-03-07 14:15 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 20:00:01 2025 UTC |
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