diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index d087023..48b6ae5 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -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(); }