Fix motiv being down for getInventory
This commit is contained in:
parent
a327f070aa
commit
d27d54f7da
1 changed files with 7 additions and 1 deletions
|
|
@ -32,7 +32,13 @@ class MotivConnector
|
||||||
|
|
||||||
$res = $this->curlPost('InventoryService', $body_text);
|
$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)
|
protected function curlPost($url, $body)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue