|  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: 2012-07-24 20:16 UTC
From: gmblar+php at gmail dot com Assigned:
Status: Open 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
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jan 18 10:01:24 2021 UTC