From: wfan Date: Thu, 16 Nov 2023 00:04:07 +0000 (-0800) Subject: Update Merger.php to compare strict type for checkboxes where a dummy-string is being... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d876e6151285a9faad0de57293eb2ab20c595574;p=civicrm-core.git Update Merger.php to compare strict type for checkboxes where a dummy-string is being used, to prevent this matching 'true' --- 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[] = [