Skip to content

Commit

Permalink
Merge pull request #2 from giantguido/patch-1
Browse files Browse the repository at this point in the history
Update Curl.php
  • Loading branch information
amouhzi committed Jun 22, 2014
2 parents e51c182 + 0eb49b6 commit 4541073
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Curl/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ public function __construct() {
}

public function get($url, $data = array()) {
$this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
if (count($data) > 0)
$this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
else
$this->setopt(CURLOPT_URL, $url);
$this->setopt(CURLOPT_HTTPGET, TRUE);
$this->_exec();
}
Expand Down

0 comments on commit 4541073

Please sign in to comment.