diff --git a/common/HttpClient.php b/common/HttpClient.php index efc0255..0feb21f 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -416,7 +416,11 @@ class HttpClient curl_setopt($ch, CURLOPT_POST, 1); } if ($this->method != self::GET) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + if (!empty($this->_data)) { + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data); + } else { + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + } } curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($this->method));