Skip to content

Commit

Permalink
Add check for Swik Id when using getSwik
Browse files Browse the repository at this point in the history
  • Loading branch information
JuniorFt committed Mar 13, 2017
1 parent 46e976b commit 24a5663
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SwiklyAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ public function getSwik($swik) {

$swikId = $swik->getSwikId();

if (!$swikId || ($swikId && $swikId == "")) {
return array("status" => "ko", "message" => "Missing Swik Id");
}

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->url . '/v1_0/getSwik?id=' . $swikId);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
Expand Down

0 comments on commit 24a5663

Please sign in to comment.