|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62582 xmlrpc_server_* should handle exceptions
Submitted: 2012-07-16 21:16 UTC Modified: 2021-04-13 13:54 UTC
From: gmblar+php at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: XMLRPC-EPI related
PHP Version: 5.4.4 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-07-16 21:16 UTC] gmblar+php at gmail dot com
xmlrpc_server_* should handle exceptions and return a xmlrpc fault

Test script:

$xmlrpc = xmlrpc_server_create();
xmlrpc_server_register_method($xmlrpc, '', function() {
    throw new Exception('foobar', 42);

$request = xmlrpc_encode_request('', array());
$result = xmlrpc_server_call_method($xmlrpc, $request, array());
echo $result;

Expected result:
<?xml version="1.0" encoding="iso-8859-1"?>

Actual result:
Fatal error: Uncaught exception 'Exception' with message 'foobar' in -:5
Stack trace:
#0 [internal function]: {closure}('', Array, Array)
#1 -(9): xmlrpc_server_call_method(Resource id #1, '<?xml version="...', Array)
#2 {main}
  thrown in - on line 5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-24 20:16 UTC] gmblar+php at gmail dot com
-Package: *XML functions +Package: XMLRPC-EPI related
 [2012-07-24 20:16 UTC] gmblar+php at gmail dot com
Change package
 [2021-04-13 13:54 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-04-13 13:54 UTC]
The xmlrpc extension is unbundled and moved to PECL as of PHP
7.4.0.  I'm temporarily maintaining the extension, but I will not
do any feature additions.  Actually, everybody is likely better
off to switch to something else.  Thus, I'm closing this ticket.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat May 15 20:01:23 2021 UTC