Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #19 from codacy/fix-invalid-index-exception
Browse files Browse the repository at this point in the history
Fix invalid index exception
  • Loading branch information
machadoit committed Jan 7, 2016
2 parents 5bbee87 + c9e4623 commit d505188
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Codacy/Coverage/Util/CodacyApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public function sendCoverage($commit, $data)
curl_close($curl);

$json = json_decode($json_response, true);
return $json['success'];

if (isset($json['success']) || array_key_exists('success', $json)) {
return $json['success'];
} else {
return $json['error'];
}
}
}

0 comments on commit d505188

Please sign in to comment.