Fix for CRM-15420
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 14 Oct 2014 05:02:14 +0000 (10:32 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 14 Oct 2014 05:02:14 +0000 (10:32 +0530)
CRM/Dedupe/Finder.php
CRM/Utils/DeprecatedUtils.php

index 4e07fd708f3793f00a06b8ace30b33d5ddcade03..58b8a83af8585b26168c55067ff76ecbba2f4349 100644 (file)
@@ -232,7 +232,7 @@ class CRM_Dedupe_Finder {
     }
 
     // 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);
index 4ec6275a363a9e75ca8b2c090152e23eb71a5a17..eff034adaf9ef02fb0bf9608421f3829dcd87253 100644 (file)
@@ -871,7 +871,7 @@ function _civicrm_api3_deprecated_add_formatted_param(&$values, &$params) {
     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);