From 7154d2a4ff39a94b85aa4ff8a2caf22034858117 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Mon, 7 Apr 2014 15:11:49 -0400 Subject: [PATCH] CRM-14334 merge records: allow empty value to overwrite existing value --- CRM/Dedupe/Merger.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index dd046c7640..3faa547bd4 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -890,7 +890,8 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m } $rows["move_$field"][$moniker] = $label; if ($moniker == 'other') { - if ($value === NULL) { + //CRM-14334 + if ($value === NULL || $value == '') { $value = 'null'; } if ($value === 0 or $value === '0') { @@ -1185,9 +1186,10 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m if ($value == $qfZeroBug) { $value = '0'; } - if ((in_array(substr($key, 5), CRM_Dedupe_Merger::getContactFields()) or - substr($key, 0, 12) == 'move_custom_' - ) and $value != NULL) { + if ((in_array(substr($key, 5), CRM_Dedupe_Merger::getContactFields()) || + substr($key, 0, 12) == 'move_custom_') && + $value != NULL + ) { $submitted[substr($key, 5)] = $value; } elseif (substr($key, 0, 14) == 'move_location_' and $value != NULL) { -- 2.25.1