don't choke if we get a bad JSON result
This commit is contained in:
parent
0375e3977a
commit
89a287a94c
@ -153,9 +153,12 @@
|
||||
public function isConnected() : bool
|
||||
{
|
||||
$json = $this->curl_request_json("/ping");
|
||||
if ($json["result"] == "success")
|
||||
if (is_array($json))
|
||||
{
|
||||
return true;
|
||||
if ($json["result"] == "success")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user