Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value... latest-phpxmlrpc
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 29 Apr 2022 12:40:19 +0000 (14:40 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 29 Apr 2022 12:45:27 +0000 (14:45 +0200)
php/phpxmlrpc/src/Client.php

index cd1491c..8184273 100644 (file)
@@ -1026,7 +1026,11 @@ class Client
             }
             // whether to verify cert's common name (CN); 0 for no, 1 to verify that it exists, and 2 to verify that
             // it matches the hostname used
-            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, $this->verifyhost);
+            // php8 no longer supports 1
+            $verifyhost = $this->verifyhost;
+            if ($verifyhost === 1)
+               $verifyhost = 2;
+            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, $verifyhost);
             // allow usage of different SSL versions
             curl_setopt($curl, CURLOPT_SSLVERSION, $sslVersion);
         }