if (!empty($values['state_province']) || (!empty($values['state_province_id']) && $values['state_province_id'] != 'null')) {
if (!empty($values['state_province_id'])) {
- $stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']);
+ $stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']) ?? '';
}
else {
if (!$stateName) {
$values['state_province'],
'name',
'abbreviation'
- );
+ ) ?? '';
}
else {
- $stateProvince = $values['state_province'];
+ $stateProvince = $values['state_province'] ?? '';
}
}