static public $xmlrpcstr = array(
'unknown_method' => 'Unknown method',
- 'invalid_return' => 'Invalid return payload: enable debugging to examine incoming payload',
+ 'invalid_return' => 'Invalid response payload (you can use the setDebug method to allow analysis of the response)',
'incorrect_params' => 'Incorrect parameters passed to method',
'introspect_unknown' => "Can't introspect: method unknown",
- 'http_error' => "Didn't receive 200 OK from remote server.",
- 'no_data' => 'No data received from server.',
- 'no_ssl' => 'No SSL support compiled in.',
+ 'http_error' => "Didn't receive 200 OK from remote server",
+ 'no_data' => 'No data received from server',
+ 'no_ssl' => 'No SSL support compiled in',
'curl_fail' => 'CURL error',
'invalid_request' => 'Invalid request payload',
- 'no_curl' => 'No CURL support compiled in.',
+ 'no_curl' => 'No CURL support compiled in',
'server_error' => 'Internal server error',
'multicall_error' => 'Received from server invalid multicall response',
'multicall_notstruct' => 'system.multicall expected struct',
- 'multicall_nomethod' => 'missing methodName',
+ 'multicall_nomethod' => 'Missing methodName',
'multicall_notstring' => 'methodName is not a string',
- 'multicall_recursion' => 'recursive system.multicall forbidden',
- 'multicall_noparams' => 'missing params',
+ 'multicall_recursion' => 'Recursive system.multicall forbidden',
+ 'multicall_noparams' => 'Missing params',
'multicall_notarray' => 'params is not an array',
'cannot_decompress' => 'Received from server compressed HTTP and cannot decompress',
xml_get_current_line_number($parser), xml_get_current_column_number($parser));
}
error_log($errStr);
- $r = new Response(0, PhpXmlRpc::$xmlrpcerr['invalid_return'], PhpXmlRpc::$xmlrpcstr['invalid_return'] . ' (' . $errStr . ')');
+ $r = new Response(0, PhpXmlRpc::$xmlrpcerr['invalid_return'], PhpXmlRpc::$xmlrpcstr['invalid_return'] . ' ' . $errStr);
xml_parser_free($parser);
if ($this->debug) {
print $errStr;
/**
* Enables/disables the echoing to screen of the xmlrpc responses received.
*
- * @param integer $in values 0, 1, 2 are supported
+ * @param integer $level values 0, 1, 2 are supported
*/
- public function setDebug($in)
+ public function setDebug($level)
{
- $this->debug = $in;
+ $this->debug = $level;
}
}