From 520b28fe82eb1baeb9537b21abef4461ae80dd63 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 17 Nov 2015 15:24:03 +0530 Subject: [PATCH] CRM-17564: Dedupe rule doesnt appear to be working correctly ---------------------------------------- * CRM-17564: Dedupe rule doesnt appear to be working correctly... https://issues.civicrm.org/jira/browse/CRM-17564 --- CRM/Dedupe/Finder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Dedupe/Finder.php b/CRM/Dedupe/Finder.php index 2268bf865d..f6615c12c8 100644 --- a/CRM/Dedupe/Finder.php +++ b/CRM/Dedupe/Finder.php @@ -292,8 +292,9 @@ class CRM_Dedupe_Finder { // the -digit to civicrm_address.location_type_id and -Primary to civicrm_address.is_primary foreach ($flat as $key => $value) { $matches = array(); - if (preg_match('/(.*)-(\d+|Primary)$/', $key, $matches)) { - $flat[$matches[1]] = $value; + if (preg_match('/(.*)-(Primary-[\d+])$|(.*)-(\d+|Primary)$/', $key, $matches)) { + $return = array_values(array_filter($matches)); + $flat[$return[1]] = $value; unset($flat[$key]); } } -- 2.25.1