php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45880 libxml_use_internal_errors disables/resets previous call to set_error_handler
Submitted: 2008-08-21 10:01 UTC Modified: 2008-08-29 15:16 UTC
From: james at dunmore dot me dot uk Assigned:
Status: Closed Package: *XML functions
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: james at dunmore dot me dot uk
New email:
PHP Version: OS:

 

 [2008-08-21 10:01 UTC] james at dunmore dot me dot uk
Description:
------------
We use a custom error handler using  set_error_handler() I found that after I call

 libxml_use_internal_errors(false); 

It resets my error_handler - not sure if this is intended?



Reproduce code:
---------------
//my set_error_handler suppresses E_NOTICE and E_WARNING

//put an E_WARNING here, and it WILL be suppressed

libxml_use_internal_errors(false);

//put an E_WARNING here, and it won't be suppressed



Expected result:
----------------
Errors Suppressed

Actual result:
--------------
Errors not Suppresses

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-21 11:00 UTC] johannes@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi

Could you please try with 5.3, we made many changes to the error handling there which won't be backported to 5.2 as they require too many internal changes for a bug fix release. The issue should be fixed there.
 [2008-08-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-08-29 15:16 UTC] james at dunmore dot me dot uk
Hi,

Sorry for the delay, took me a while to find the time to get 5.3 installed.

I tried on 5.3 - problem gone away

I've also done some further testing on 5.2.6, and it appears to only happen when we call that code as part of a SOAP service, from a SOAP client - problem fixed by re-calling set_error_handler to my custom one - but problem doesn't happen on same server, same code, but when called from another file (and not from a test SOAP client).

Therefore, I tend to think that this is related to our install - but I'm getting someone else to look at it, and I will post my findings.

Thank-you for your time.


Regards,
James.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC