Skip to content

Commit b605844

Browse files
committed
Update Curl.php
1 parent 157858a commit b605844

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Curl/Curl.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public function post($url, $data = array())
6262
{
6363
$this->setopt(CURLOPT_URL, $url);
6464
$this->setopt(CURLOPT_POST, true);
65-
if (count($data)>0)
66-
{
67-
$data = http_build_query($data);
68-
}
65+
if (is_array($data) || is_object($data))
66+
{
67+
$data = http_build_query($data);
68+
}
6969
$this->setopt(CURLOPT_POSTFIELDS, $data);
7070
$this->_exec();
7171
}

0 commit comments

Comments
 (0)