Skip to content

Commit 157858a

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Curl/Curl.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +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+
{
6567
$data = http_build_query($data);
68+
}
6669
$this->setopt(CURLOPT_POSTFIELDS, $data);
6770
$this->_exec();
6871
}

0 commit comments

Comments
 (0)