Fix motiv being down for getInventory

This commit is contained in:
Kendrick Chan 2022-07-16 19:22:59 +08:00
parent a327f070aa
commit d27d54f7da

View file

@ -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)