diff --git a/src/crm/api/handler/MassEntityAPIHandler.php b/src/crm/api/handler/MassEntityAPIHandler.php index 74288279..da58db9b 100644 --- a/src/crm/api/handler/MassEntityAPIHandler.php +++ b/src/crm/api/handler/MassEntityAPIHandler.php @@ -290,7 +290,7 @@ public function getRecords($param_map,$header_map) $this->addHeader("Content-Type", "application/json"); $responseInstance = APIRequest::getInstance($this)->getBulkAPIResponse(); $responseJSON = $responseInstance->getResponseJSON(); - $records = $responseJSON["data"]; + $records = $responseJSON["data"]??[]; $recordsList = array(); foreach ($records as $record) { $recordInstance = ZCRMRecord::getInstance($this->module->getAPIName(), $record["id"]); @@ -396,4 +396,4 @@ public function constructJSONForMassUpdate($idList, $apiName, $value) "data" => $massUpdateArray ); } -} \ No newline at end of file +}