}
$contactFields = [
'contact_id' => $contactId,
- 'location_type_id' => CRM_Utils_Array::value('location_type_id', $value),
+ 'location_type_id' => $value['location_type_id'] ?? NULL,
];
$contactFields['is_primary'] = 0;
}
// contact_id in params might be empty or the string 'null' so cast to integer
- $contactId = (int) CRM_Utils_Array::value('contact_id', $params);
+ $contactId = (int) ($params['contact_id'] ?? 0);
// If id is set & we haven't been passed a contact_id, retrieve it
if (!empty($params['id']) && !isset($params['contact_id'])) {
$entity = new $class();