diff --git a/src/Service/MotivConnector.php b/src/Service/MotivConnector.php index 60847192..f0ee8bc1 100644 --- a/src/Service/MotivConnector.php +++ b/src/Service/MotivConnector.php @@ -32,7 +32,13 @@ class MotivConnector $res = $this->curlPost('InventoryService', $body_text); - return json_decode($res, true); + $inv_res = json_decode($res, true); + + // check result + if ($inv_res == null) + return []; + + return $inv_res; } protected function curlPost($url, $body)