From: gggeek <giunta.gaetano@gmail.com>
Date: Wed, 8 Feb 2023 16:33:54 +0000 (+0000)
Subject: fixes
X-Git-Tag: 4.10.0~16
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f91eabedd5d88b463bf817b93936229ba4c9f950;p=plcapi.git

fixes
---

diff --git a/src/Client.php b/src/Client.php
index 7850dd99..96f4faa5 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -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) {
diff --git a/tests/07ClientTest.php b/tests/07ClientTest.php
index 0845981f..e147ab4e 100644
--- a/tests/07ClientTest.php
+++ b/tests/07ClientTest.php
@@ -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());
     }