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.
2 parents 089de23 + 26f99ab commit 3db6746Copy full SHA for 3db6746
app/Tricks/Exceptions/GithubEmailAccessException.php
@@ -0,0 +1,10 @@
1
+<?php
2
+
3
+namespace Tricks\Exceptions;
4
5
+use RuntimeException;
6
7
+class GithubEmailAccessException extends RuntimeException
8
+{
9
10
+}
app/Tricks/Services/Social/Github.php
@@ -149,6 +149,12 @@ protected function getVerifiedEmails($token)
149
150
curl_setopt_array($ch, $options);
151
152
- return json_decode(curl_exec($ch));
+ $result = curl_exec($ch);
153
+ if ($result === false) {
154
+ $error = curl_error($ch);
155
+ throw new GithubEmailAccessException($error);
156
+ }
157
158
+ return json_decode($result);
159
}
160
0 commit comments