@@ -1274,19 +1274,19 @@ protected function sendViaCURL($req, $method, $server, $port, $path, $opts)
12741274 $ this ->errstr = 'no response ' ;
12751275 $ resp = new static::$ responseClass (0 , PhpXmlRpc::$ xmlrpcerr ['curl_fail ' ], PhpXmlRpc::$ xmlrpcstr ['curl_fail ' ] .
12761276 ': ' . curl_error ($ curl ));
1277- @ curl_close ($ curl );
1277+ if ( PHP_MAJOR_VERSION < 8 ) curl_close ($ curl );
12781278 if ($ opts ['keepalive ' ]) {
12791279 $ this ->xmlrpc_curl_handle = null ;
12801280 }
12811281 } else {
12821282 if (!$ opts ['keepalive ' ]) {
1283- @ curl_close ($ curl );
1283+ if ( PHP_MAJOR_VERSION < 8 ) curl_close ($ curl );
12841284 }
12851285 $ resp = $ req ->parseResponse ($ result , true , $ opts ['return_type ' ]);
12861286 if ($ opts ['keepalive ' ]) {
12871287 /// @todo if we got back a 302 or 308, we should not reuse the curl handle for later calls
12881288 if ($ resp ->faultCode () == PhpXmlRpc::$ xmlrpcerr ['http_error ' ]) {
1289- @ curl_close ($ curl );
1289+ if ( PHP_MAJOR_VERSION < 8 ) curl_close ($ curl );
12901290 $ this ->xmlrpc_curl_handle = null ;
12911291 }
12921292 }
@@ -1442,7 +1442,7 @@ protected function createCURLHandle($req, $method, $server, $port, $path, $opts)
14421442 curl_setopt ($ curl , CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE );
14431443 } else {
14441444 $ this ->getLogger ()->error ('XML-RPC: ' . __METHOD__ . ': warning. HTTP2 is not supported by the current PHP/curl install ' );
1445- @ curl_close ($ curl );
1445+ if ( PHP_MAJOR_VERSION < 8 ) curl_close ($ curl );
14461446 return false ;
14471447 }
14481448 break ;
@@ -1457,7 +1457,7 @@ protected function createCURLHandle($req, $method, $server, $port, $path, $opts)
14571457 curl_setopt ($ curl , CURLOPT_HTTPAUTH , $ opts ['authtype ' ]);
14581458 } elseif ($ opts ['authtype ' ] != 1 ) {
14591459 $ this ->getLogger ()->error ('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported by the current PHP/curl install ' );
1460- @ curl_close ($ curl );
1460+ if ( PHP_MAJOR_VERSION < 8 ) curl_close ($ curl );
14611461 return false ;
14621462 }
14631463 }
@@ -1508,7 +1508,7 @@ protected function createCURLHandle($req, $method, $server, $port, $path, $opts)
15081508 curl_setopt ($ curl , CURLOPT_PROXYAUTH , $ opts ['proxy_authtype ' ]);
15091509 } elseif ($ opts ['proxy_authtype ' ] != 1 ) {
15101510 $ this ->getLogger ()->error ('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported by the current PHP/curl install ' );
1511- @ curl_close ($ curl );
1511+ if ( PHP_MAJOR_VERSION < 8 ) curl_close ($ curl );
15121512 return false ;
15131513 }
15141514 }
0 commit comments