We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10f545f commit 87fa4b7Copy full SHA for 87fa4b7
src/stats.php
@@ -110,6 +110,15 @@ function getGitHubApiResponse(string $url): string
110
curl_setopt($ch, CURLOPT_VERBOSE, false);
111
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
112
$response = curl_exec($ch);
113
+
114
+ //Handles curl errors
115
+ if($response === false) {
116
+ if(str_contains(curl_error($ch), 'unable to get local issuer certificate')) {
117
+ throw new InvalidArgumentException("You don't have valid SSL Certificate installed or XAMPP.");
118
+ }
119
+ throw new InvalidArgumentException("Something is wrong with getGitHubApiResponse().");
120
121
122
curl_close($ch);
123
return $response;
124
}
0 commit comments