comments; remove devs emails from code
authorgggeek <giunta.gaetano@gmail.com>
Wed, 8 Feb 2023 12:09:37 +0000 (12:09 +0000)
committergggeek <giunta.gaetano@gmail.com>
Wed, 8 Feb 2023 12:09:37 +0000 (12:09 +0000)
src/Client.php
src/Encoder.php
src/PhpXmlRpc.php
src/Request.php

index b10100f..1113e92 100644 (file)
@@ -921,7 +921,7 @@ class Client
             }
         }
 
-        // thanks to Grant Rauscher <grant7@firstworld.net> 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 <justin@voxel.net>
+     * 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!
      *
index 17c14b1..871d1cb 100644 (file)
@@ -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 <ping@alt.it>)
+                // it has to return an empty object in case, not a boolean. (giancarlo pinerolo)
                 $xmlrpcVal = new Value();
                 break;
         }
index 9a2757f..fea0b12 100644 (file)
@@ -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,
index 86560ed..0b89150 100644 (file)
@@ -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 <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);
@@ -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;
                 }