A XML-RPC callback needs to use xmlrpc_error() to return errors.

This is what the XML-RPC callbacks defined from Drupal core do. See xmlrpc_server_method_signature(), for example.

$xmlrpc_server = xmlrpc_server_get();
if (!isset($xmlrpc_server->callbacks[$methodname])) {
    return xmlrpc_error(-32601, t('Server error. Requested method @methodname not specified.', array(
        "@methodname" => $methodname,
    )));
}

When there are no errors, the XML-RPC callback can just return TRUE.

Issue fork apc-3462649

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review

  • avpaderno committed 67463567 on 7.x-1.x
    Issue #3462649: Use xmlrpc_error() to return errors
    
avpaderno’s picture

Status: Needs review » Fixed
avpaderno’s picture

Priority: Normal » Minor

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.