This commit is contained in:
2021-04-14 16:04:17 +08:00
parent d51a912ddf
commit 8c336e7cd5
2 changed files with 4 additions and 4 deletions
+2 -3
View File
@@ -50,14 +50,13 @@ class Curl extends ClientAbstracts
if ($isHttps !== false) {
$this->curlHandlerSslSet($resource);
}
if (empty($params)) {
if (empty($params) && empty($this->getData())) {
return $resource;
}
if ($method === self::GET && !empty($this->getData())) {
curl_setopt($resource, CURLOPT_POSTFIELDS, $this->getData());
}
if ($method === self::POST) {
} else if ($method === self::POST) {
curl_setopt($resource, CURLOPT_POSTFIELDS, $this->mergeParams($params));
}
if ($method === self::UPLOAD) {