diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index c662113..da7513c 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -633,8 +633,12 @@ class HttpClient if (!empty($this->agent)) { curl_setopt($ch, CURLOPT_USERAGENT, $this->agent); } - - curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile()); + if (!empty($this->getSslCertFile())) { + curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile()); + } + if (!empty($this->getSslCertFile())) { + curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile()); + } curl_setopt($ch, CURLOPT_SSLKEY, $this->getSslKeyFile()); curl_setopt($ch, CURLOPT_NOBODY, FALSE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置