From f91eabedd5d88b463bf817b93936229ba4c9f950 Mon Sep 17 00:00:00 2001 From: gggeek Date: Wed, 8 Feb 2023 16:33:54 +0000 Subject: [PATCH] fixes --- src/Client.php | 8 ++++++-- tests/07ClientTest.php | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) 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()); } -- 2.47.0