diff --git a/Lib/Bitrix24Integration.php b/Lib/Bitrix24Integration.php index 4d956a5..7e941a6 100644 --- a/Lib/Bitrix24Integration.php +++ b/Lib/Bitrix24Integration.php @@ -929,7 +929,7 @@ public function b24GetPhones($user_id = null): array $this->b24Users = []; foreach ($users_list['result'] as $value) { $user = []; - $user['NAME'] = '' . $value['NAME'] . ' ' . $value['LAST_NAME']; + $user['NAME'] = '' . ($value['NAME'] ?? '') . ' ' . ($value['LAST_NAME'] ?? ''); $user['ID'] = $value['ID']; $user['PERSONAL_MOBILE'] = preg_replace('/(\D)/', '', $value['PERSONAL_MOBILE']??''); $user['WORK_PHONE'] = preg_replace('/(\D)/', '', $value['WORK_PHONE']??''); diff --git a/bin/ConnectorDb.php b/bin/ConnectorDb.php index b262164..182fa55 100644 --- a/bin/ConnectorDb.php +++ b/bin/ConnectorDb.php @@ -938,7 +938,7 @@ public function updateEntContact($action, $data):array $dateModify = $entData['DATE_MODIFY']; $statusLeadId= $entData['STATUS_SEMANTIC_ID']??''; if(Bitrix24Integration::API_CRM_LIST_CONTACT === $action){ - $name = $entData['LAST_NAME'] ." " . $entData['NAME']. " " . $entData['SECOND_NAME']; + $name = ($entData['LAST_NAME'] ?? '') ." " . ($entData['NAME'] ?? ''). " " . ($entData['SECOND_NAME'] ?? ''); }else{ $name = $entData['TITLE']; }