PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » XML_RPC2 » Bug #8641

set_error_handler($oldErrorHandler) mangles error_types

Details

Submitted2006-09-05 18:40 UTC
Fromgauthierm at php dot net
Assignedsergiosgc
StatusClosed
PackageXML_RPC2
PHP Version5.1.5
OSLinux
Roadmaps(Not assigned)

Comments

[2006-09-05 18:40 UTC] gauthierm at php dot net

Description:
------------
In the server backends of XML_RPC2, the call to restore the custom error handler uses set_error_handler($oldErrorHandler). Because no second parameter is passed to this function call, the old error handler is called for the default error types (everything). The correct way to restore the error handler is to use the restore_error_handler() function.

For example, if I set a custom error handler that handles only E_NOTICE and then run an XML_RPC2 server, my custom error handler will run on all errors.

Test script:
---------------
The patch at http://worksintheory.org/files/pear/XML_RPC2-error-handler-20060905.diff fixes this bug against CVS.

[2006-12-02 18:09 UTC] sergiosgc at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

Thanks again for the diffs.