----------------------------------------
* CRM-17564: Dedupe rule doesnt appear to be working correctly...
https://issues.civicrm.org/jira/browse/CRM-17564
// 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('/(.*)-(Primary-[\d+])$|(.*)-(\d+|Primary)$/', $key, $matches)) {
+ if (preg_match('/(.*)-(Primary-[\d+])$|(.*)-(\d+|Primary)$/', $key, $matches)) {
$return = array_values(array_filter($matches));
$flat[$return[1]] = $value;
unset($flat[$key]);