}
// handle preferred_communication_method
- if (array_key_exists('preferred_communication_method', $fields)) {
+ if (!empty($fields['preferred_communication_method'])) {
$methods = array_intersect($fields['preferred_communication_method'], array('1'));
$methods = array_keys($methods);
sort($methods);
return TRUE;
}
- if (isset($values['preferred_communication_method'])) {
+ if (!empty($values['preferred_communication_method'])) {
$comm = array();
$pcm = array_change_key_case(array_flip(CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'preferred_communication_method')), CASE_LOWER);