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 8472129 commit 772e4f1Copy full SHA for 772e4f1
src/stats.php
@@ -155,7 +155,7 @@ function fetchGraphQL(string $query): stdClass
155
$ch = getGraphQLCurlHandle($query);
156
$response = curl_exec($ch);
157
curl_close($ch);
158
- $obj = json_decode($response);
+ $obj = is_string($response) ? json_decode($response) : null;
159
// handle curl errors
160
if ($response === false || $obj === null || curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
161
// set response code to curl error code
0 commit comments