From 6822d1981441229c9c6e2ff3af8d3b1dc197a23a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 16 Dec 2021 09:23:39 +1300 Subject: [PATCH] Remove never passed variables This function is no longer shared so is only called from one place. That place doesn't use contactDetails so don't return. Also never sets skipCustom so stop checking (will remove the other non-passed soon) --- CRM/Dedupe/Merger.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 575aea7564..92b7e8c6d3 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -687,7 +687,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m // This parameter causes blank fields to be be emptied out. // We can probably remove. $params['updateBlankLocInfo'] = TRUE; - [$data] = self::formatProfileContactParams($params, [], $contactID); + $data = self::formatProfileContactParams($params, [], $contactID); CRM_Contact_BAO_Contact::create($data); } @@ -704,7 +704,6 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m * @param int $contactID * @param int $ufGroupId * @param null $ctype - * @param bool $skipCustom * * @return array */ @@ -713,8 +712,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m $fields, $contactID = NULL, $ufGroupId = NULL, - $ctype = NULL, - $skipCustom = FALSE + $ctype = NULL ) { $data = $contactDetails = []; @@ -952,7 +950,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m //save email/postal greeting and addressee values if any, CRM-4575 $data[$key . '_id'] = $value; } - elseif (!$skipCustom && ($customFieldId = CRM_Core_BAO_CustomField::getKeyID($key))) { + elseif (($customFieldId = CRM_Core_BAO_CustomField::getKeyID($key))) { // for autocomplete transfer hidden value instead of label if ($params[$key] && isset($params[$key . '_id'])) { $value = $params[$key . '_id']; @@ -1064,7 +1062,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m } } - return [$data, $contactDetails]; + return $data; } /** -- 2.25.1