From 1ea6213f04b876be7e8084eed4945fcb414c622c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BE=D0=BB=D0=BE=D0=B1=D1=83=D0=B5=D0=B2=20=D0=90?= Date: Mon, 27 Jul 2015 20:07:52 +0600 Subject: [PATCH] #19 fix send post array --- Curl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Curl.php b/Curl.php index 8aec8a3..45c93bd 100755 --- a/Curl.php +++ b/Curl.php @@ -162,7 +162,7 @@ public function post($url, $data, $params = array(), $debug = false) $options = $this->getOptions(); $options[CURLOPT_POST] = true; - $options[CURLOPT_POSTFIELDS] = $data; + $options[CURLOPT_POSTFIELDS] = is_array($data) ? http_build_query($data) : $data; return $this->exec($url, $options, $debug); }