fixes
authorgggeek <giunta.gaetano@gmail.com>
Wed, 8 Feb 2023 16:33:54 +0000 (16:33 +0000)
committergggeek <giunta.gaetano@gmail.com>
Wed, 8 Feb 2023 16:33:54 +0000 (16:33 +0000)
src/Client.php
tests/07ClientTest.php

index 7850dd9..96f4faa 100644 (file)
@@ -935,7 +935,9 @@ class Client
                 $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported by this PHP install');
             }
         } else {
-            $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported');
+            if ($opts['request_compression'] != '') {
+                $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported');
+            }
         }
 
         // thanks to Grant Rauscher
@@ -1233,7 +1235,9 @@ class Client
                 $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported by this PHP install');
             }
         } else {
-            $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported');
+            if ($opts['request_compression'] != '') {
+                $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported');
+            }
         }
 
         if (!$opts['keepalive'] || !$this->xmlrpc_curl_handle) {
index 0845981..e147ab4 100644 (file)
@@ -46,6 +46,7 @@ class ClientTest extends PhpXmlRpc_LoggerAwareTestCase
         ));
         $this->client->setOption(\PhpXmlRpc\Client::OPT_USERNAME, 'user');
         $this->client->setOption(\PhpXmlRpc\Client::OPT_AUTH_TYPE, 2);
+        $this->client->setOption(\PhpXmlRpc\Client::OPT_USE_CURL, \PhpXmlRpc\Client::USE_CURL_NEVER);
         $r = $this->client->send($m);
         $this->assertEquals(\PhpXmlRpc\PhpXmlRpc::$xmlrpcerr['unsupported_option'], $r->faultCode());
     }