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

Commit d505188

Browse files
committed
Merge pull request #19 from codacy/fix-invalid-index-exception
Fix invalid index exception
2 parents 5bbee87 + c9e4623 commit d505188

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Codacy/Coverage/Util/CodacyApiClient.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ public function sendCoverage($commit, $data)
5555
curl_close($curl);
5656

5757
$json = json_decode($json_response, true);
58-
return $json['success'];
58+
59+
if (isset($json['success']) || array_key_exists('success', $json)) {
60+
return $json['success'];
61+
} else {
62+
return $json['error'];
63+
}
5964
}
6065
}

0 commit comments

Comments
 (0)