From bf56b46b6ef9035a2167e9966feb192e7e6341df Mon Sep 17 00:00:00 2001 From: gggeek Date: Wed, 8 Feb 2023 12:09:37 +0000 Subject: [PATCH] comments; remove devs emails from code --- src/Client.php | 4 ++-- src/Encoder.php | 6 +++--- src/PhpXmlRpc.php | 44 ++++++++++++++++++++++---------------------- src/Request.php | 4 +++- 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/Client.php b/src/Client.php index b10100fa..1113e927 100644 --- a/src/Client.php +++ b/src/Client.php @@ -921,7 +921,7 @@ class Client } } - // thanks to Grant Rauscher for this + // thanks to Grant Rauscher $credentials = ''; if ($opts['username'] != '') { $credentials = 'Authorization: Basic ' . base64_encode($opts['username'] . ':' . $opts['password']) . "\r\n"; @@ -1071,7 +1071,7 @@ class Client } /** - * Contributed by Justin Miller + * Contributed by Justin Miller * Requires curl to be built into PHP * NB: CURL versions before 7.11.10 cannot use proxy to talk to https servers! * diff --git a/src/Encoder.php b/src/Encoder.php index 17c14b16..871d1cbf 100644 --- a/src/Encoder.php +++ b/src/Encoder.php @@ -31,7 +31,7 @@ class Encoder * 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: @@ -160,7 +160,7 @@ class Encoder * 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: @@ -268,7 +268,7 @@ class Encoder break; // catch "user function", "unknown type" default: - // it has to return an empty object in case, not a boolean. (giancarlo pinerolo ) + // it has to return an empty object in case, not a boolean. (giancarlo pinerolo) $xmlrpcVal = new Value(); break; } diff --git a/src/PhpXmlRpc.php b/src/PhpXmlRpc.php index 9a2757f5..fea0b123 100644 --- a/src/PhpXmlRpc.php +++ b/src/PhpXmlRpc.php @@ -16,31 +16,31 @@ class PhpXmlRpc * @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, diff --git a/src/Request.php b/src/Request.php index 86560ed6..0b891507 100644 --- a/src/Request.php +++ b/src/Request.php @@ -261,7 +261,7 @@ class Request /// @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 originally in PEARified version of the lib + // idea from Luca Mariano, originally in PEARified version of the lib $pos = strrpos($data, ''); if ($pos !== false) { $data = substr($data, 0, $pos + 17); @@ -390,6 +390,8 @@ class Request // 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; } -- 2.47.0