php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55013 domDocument vs error_get_last()
Submitted: 2011-06-09 12:45 UTC Modified: 2013-12-06 07:27 UTC
From: finonimus at hotmail dot com Assigned: mike (profile)
Status: Closed Package: *General Issues
PHP Version: Irrelevant OS: windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: finonimus at hotmail dot com
New email:
PHP Version: OS:

 

 [2011-06-09 12:45 UTC] finonimus at hotmail dot com
Description:
------------
Why new domDocument reset my error?

Test script:
---------------
<?php

print_r('before<br>');
trigger_error('error');
print_r(error_get_last());
$xml = new DOMDocument('1.0', 'UTF-8');

echo '<br><br><br>';

print_r('after<br>');
trigger_error('error');
$xml = new DOMDocument('1.0', 'UTF-8');
print_r(error_get_last());

?>

Expected result:
----------------
see both errors

Actual result:
--------------
only see before

Patches

TPDVG (last revision 2011-06-09 10:55 UTC by finonimus at hotmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-06 07:27 UTC] mike@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mike
 [2013-12-06 07:27 UTC] mike@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 00:01:34 2025 UTC