From 1acd98ec8ae5af16e8f63f039c69859bbc47330c Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 27 Apr 2019 17:40:14 +1200 Subject: [PATCH] Declare contactType var rather than using long array syntax. Very small tidy up for legibility --- CRM/Dedupe/Merger.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index c0ec0698a5..798ef78233 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -1609,6 +1609,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m return FALSE; } + $contactType = $migrationInfo['main_details']['contact_type']; $relTables = CRM_Dedupe_Merger::relTables(); $submittedCustomFields = $moveTables = $tableOperations = $removeTables = []; @@ -1680,9 +1681,9 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m // fix custom fields so they're edible by createProfileContact() $treeCache = []; - if (!array_key_exists($migrationInfo['main_details']['contact_type'], $treeCache)) { - $treeCache[$migrationInfo['main_details']['contact_type']] = CRM_Core_BAO_CustomGroup::getTree( - $migrationInfo['main_details']['contact_type'], + if (!array_key_exists($contactType, $treeCache)) { + $treeCache[$contactType] = CRM_Core_BAO_CustomGroup::getTree( + $contactType, NULL, NULL, -1, @@ -1696,7 +1697,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m } $cFields = []; - foreach ($treeCache[$migrationInfo['main_details']['contact_type']] as $key => $group) { + foreach ($treeCache[$contactType] as $key => $group) { if (!isset($group['fields'])) { continue; } -- 2.25.1