diff --git a/lib/internal/Magento/Framework/HTTP/Client/Curl.php b/lib/internal/Magento/Framework/HTTP/Client/Curl.php index 713ea19ab9789..8efb04220a099 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Curl.php @@ -337,7 +337,7 @@ public function getStatus() * Make request * @param string $method * @param string $uri - * @param array $params + * @param array array|string $params * @return void * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) @@ -348,7 +348,7 @@ protected function makeRequest($method, $uri, $params = []) $this->curlOption(CURLOPT_URL, $uri); if ($method == 'POST') { $this->curlOption(CURLOPT_POST, 1); - $this->curlOption(CURLOPT_POSTFIELDS, http_build_query($params)); + $this->curlOption(CURLOPT_POSTFIELDS, is_array($params) ? http_build_query($params) : $params); } elseif ($method == "GET") { $this->curlOption(CURLOPT_HTTPGET, 1); } else {