You are here

function xmlrpc_server_server_error in Services 7

Same name and namespace in other branches
  1. 5 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_server_error()
  2. 6 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_server_error()
  3. 6.2 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_server_error()

File

servers/xmlrpc_server/xmlrpc_server.module, line 42
@author Services Dev Team

Code

function xmlrpc_server_server_error($message) {
  if (!is_array($message)) {
    $message = (array) $message;
  }
  $message = implode(' ', $message);
  $matches = array();
  if (preg_match("/\\#(\\d+)/", $message, $matches)) {
    $code = $matches[1];
  }
  else {
    $code = 1;
  }
  return xmlrpc_error($code, strip_tags($message));
}