We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 157858a commit b605844Copy full SHA for b605844
src/Curl/Curl.php
@@ -62,10 +62,10 @@ public function post($url, $data = array())
62
{
63
$this->setopt(CURLOPT_URL, $url);
64
$this->setopt(CURLOPT_POST, true);
65
- if (count($data)>0)
66
- {
67
- $data = http_build_query($data);
68
- }
+ if (is_array($data) || is_object($data))
+ {
+ $data = http_build_query($data);
+ }
69
$this->setopt(CURLOPT_POSTFIELDS, $data);
70
$this->_exec();
71
}
0 commit comments