From b5780972105512f088c235b1538e6cbbb1ee1ae4 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@inria.fr>
Date: Fri, 29 Apr 2022 14:40:19 +0200
Subject: [PATCH]  Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer
 accepts the value 1, value 2 will be used instead in
 /usr/share/plc_api/php/phpxmlrpc/src/Client.php on line 1029

---
 php/phpxmlrpc/src/Client.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/php/phpxmlrpc/src/Client.php b/php/phpxmlrpc/src/Client.php
index cd1491c3..81842732 100644
--- a/php/phpxmlrpc/src/Client.php
+++ b/php/phpxmlrpc/src/Client.php
@@ -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);
         }
-- 
2.47.0