Skip to content

Commit 4541073

Browse files
committed
Merge pull request #2 from giantguido/patch-1
Update Curl.php
2 parents e51c182 + 0eb49b6 commit 4541073

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Curl/Curl.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ public function __construct() {
5050
}
5151

5252
public function get($url, $data = array()) {
53-
$this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
53+
if (count($data) > 0)
54+
$this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
55+
else
56+
$this->setopt(CURLOPT_URL, $url);
5457
$this->setopt(CURLOPT_HTTPGET, TRUE);
5558
$this->_exec();
5659
}

0 commit comments

Comments
 (0)