|  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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 - 17 = ?
Subscribe to this entry?

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


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


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

Expected result:
Errors Suppressed

Actual result:
Errors not Suppresses


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-21 11:00 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

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

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.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Oct 05 00:01:24 2023 UTC