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 b205c58 commit f1bd90fCopy full SHA for f1bd90f
src/Services/IPApi.php
@@ -71,7 +71,7 @@ public function locate($ip)
71
$json = json_decode($data[0]);
72
73
// Verify response status
74
- if ($json->status !== 'success') {
+ if ($json && $json->status !== 'success') {
75
throw new Exception('Request failed (' . $json->message . ')');
76
}
77
0 commit comments