From d876e6151285a9faad0de57293eb2ab20c595574 Mon Sep 17 00:00:00 2001 From: wfan Date: Wed, 15 Nov 2023 16:04:07 -0800 Subject: [PATCH] Update Merger.php to compare strict type for checkboxes where a dummy-string is being used, to prevent this matching 'true' --- CRM/Dedupe/Merger.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index d4cb2f7c61..08852897a8 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -1561,8 +1561,8 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m $value[1] = NULL; } - // Display a checkbox to migrate, only if the values are different - if ($value != $main[$field]) { + // Display a checkbox to migrate, only if the values are different, should check type also for true value + if ($value !== $main[$field]) { // Don't check source if main is empty, because the source of the other contact is not the source of the merged contact $isChecked = ($field === 'source') ? FALSE : (!isset($main[$field]) || $main[$field] === ''); $elements[] = [ -- 2.25.1