$apiFormattedParams['location_type_id'] = $params['field_name'][2];
}
}
- elseif ($params['field_name'][2] == 0) {
+ elseif (isset($params['field_name'][2]) && $params['field_name'][2] == 0) {
// 0 is Primary location type
- $apiFormattedParams['location_type_id'] = NULL;
+ $apiFormattedParams['location_type_id'] = '';
}
if (!empty($params['field_name'][3])) {
$apiFormattedParams['phone_type_id'] = $params['field_name'][3];