* that might wreak havoc if instances are built outside an appropriate context).
* Make sure you trust the remote server/client before enabling this!
*
- * @author Dan Libby (dan@libby.com)
+ * @author Dan Libby
*
* @param Value|Request $xmlrpcVal
* @param array $options accepted elements:
* PHP resource and NULL variables will be converted into uninitialized Value objects (which will lead to invalid
* xml-rpc when later serialized); to support encoding of the latter use the appropriate $options parameter.
*
- * @author Dan Libby (dan@libby.com)
+ * @author Dan Libby
*
* @param mixed $phpVal the value to be converted into an xml-rpc value object
* @param array $options can include:
break;
// catch "user function", "unknown type"
default:
- // it has to return an empty object in case, not a boolean. (giancarlo pinerolo <ping@alt.it>)
+ // it has to return an empty object in case, not a boolean. (giancarlo pinerolo)
$xmlrpcVal = new Value();
break;
}
* @var int[]
*/
public static $xmlrpcerr = array(
- 'unknown_method' => 1,
+ 'unknown_method' => 1, // server
/// @deprecated. left in for BC
- 'invalid_return' => 2,
- 'incorrect_params' => 3,
- 'introspect_unknown' => 4,
- 'http_error' => 5,
- 'no_data' => 6,
- 'no_ssl' => 7,
- 'curl_fail' => 8,
- 'invalid_request' => 15,
- 'no_curl' => 16,
- 'server_error' => 17,
- 'multicall_error' => 18,
- 'multicall_notstruct' => 9,
- 'multicall_nomethod' => 10,
- 'multicall_notstring' => 11,
- 'multicall_recursion' => 12,
- 'multicall_noparams' => 13,
- 'multicall_notarray' => 14,
- 'no_http2' => 19,
+ 'invalid_return' => 2, // client
+ 'incorrect_params' => 3, // server
+ 'introspect_unknown' => 4, // server
+ 'http_error' => 5, // client
+ 'no_data' => 6, // client
+ 'no_ssl' => 7, // client
+ 'curl_fail' => 8, // client
+ 'invalid_request' => 15, // server
+ 'no_curl' => 16, // client
+ 'server_error' => 17, // server
+ 'multicall_error' => 18, // client
+ 'multicall_notstruct' => 9, // client
+ 'multicall_nomethod' => 10, // client
+ 'multicall_notstring' => 11, // client
+ 'multicall_recursion' => 12, // client
+ 'multicall_noparams' => 13, // client
+ 'multicall_notarray' => 14, // client
+ 'no_http2' => 19, // client
// the following 3 are meant to give greater insight than 'invalid_return'. They use the same code for BC,
// but you can override their value in your own code
- 'invalid_xml' => 2,
- 'xml_not_compliant' => 2,
- 'xml_parsing_error' => 2,
+ 'invalid_xml' => 2, // client
+ 'xml_not_compliant' => 2, // client
+ 'xml_parsing_error' => 2, // client
/// @todo verify: can these conflict with $xmlrpcerrxml?
'cannot_decompress' => 103,
/// @todo optimization creep - return an error msg if $data == ''
// be tolerant of junk after methodResponse (e.g. javascript ads automatically inserted by free hosts)
- // idea from Luca Mariano <luca.mariano@email.it> originally in PEARified version of the lib
+ // idea from Luca Mariano, originally in PEARified version of the lib
$pos = strrpos($data, '</methodResponse>');
if ($pos !== false) {
$data = substr($data, 0, $pos + 17);
// FAULT returned, errno needs to reflect that
/// @todo feature creep - add this code to PhpXmlRpc::$xmlrpcerr
$this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': fault response received with faultCode 0 or null. Converted it to -1');
+ /// @todo in Encoder::decodeXML, we use PhpXmlRpc::$xmlrpcerr['invalid_return'] for this case (see
+ /// also the todo 17 lines above)
$errNo = -1;
}