From c5eb53dc566362c90d793cf2e6760b40e2473c06 Mon Sep 17 00:00:00 2001 From: Omashu Date: Mon, 23 Mar 2015 08:48:23 +0300 Subject: [PATCH] quick fix CurlFile support --- library/Requests/Transport/cURL.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Requests/Transport/cURL.php b/library/Requests/Transport/cURL.php index 678ab7363..75cf0ca8f 100755 --- a/library/Requests/Transport/cURL.php +++ b/library/Requests/Transport/cURL.php @@ -232,7 +232,10 @@ protected function setup_handle($url, $headers, $data, $options) { $url = self::format_get($url, $data); } elseif (!empty($data) && !is_string($data)) { - $data = http_build_query($data, null, '&'); + if ($options["type"] !== Requests::POST) { + // It does not work when CurlFile, curl supports arrays + $data = http_build_query($data, null, '&'); + } } switch ($options['type']) {