don't choke if we get a bad JSON result

This commit is contained in:
Michael Becker 2025-01-13 23:44:34 -05:00
parent 0375e3977a
commit 89a287a94c

View File

@ -153,10 +153,13 @@
public function isConnected() : bool public function isConnected() : bool
{ {
$json = $this->curl_request_json("/ping"); $json = $this->curl_request_json("/ping");
if (is_array($json))
{
if ($json["result"] == "success") if ($json["result"] == "success")
{ {
return true; return true;
} }
}
return false; return false;
} }
protected function removeRelationshipInstanceInternal(string|InstanceKey|InstanceReference $sourceInstance, string|InstanceKey|InstanceReference $relationshipInstance, array|string|InstanceKey|InstanceReference $targetInstances, \DateTime|null $effectiveDate = null) protected function removeRelationshipInstanceInternal(string|InstanceKey|InstanceReference $sourceInstance, string|InstanceKey|InstanceReference $relationshipInstance, array|string|InstanceKey|InstanceReference $targetInstances, \DateTime|null $effectiveDate = null)