dev/core#2549 Fix undefined index when merging websites
authorJohn Kingsnorth <john@johnkingsnorth.co.uk>
Mon, 19 Apr 2021 08:35:57 +0000 (09:35 +0100)
committerGitHub <noreply@github.com>
Mon, 19 Apr 2021 08:35:57 +0000 (09:35 +0100)
CRM/Dedupe/Merger.php

index 8c19989164f691542d3d3bf5d7c29b3c7b33e9f7..daab1a9d6517ee5b80723dcc623ee582a4c5ac5e 100644 (file)
@@ -2409,7 +2409,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
             ) {
               // Set this value as the default against the 'other' contact value
               $rows["move_location_{$blockName}_{$count}"]['main'] = $mainValueCheck[$blockInfo['displayField']];
-              $rows["move_location_{$blockName}_{$count}"]['main_is_primary'] = $mainValueCheck['is_primary'];
+              $rows["move_location_{$blockName}_{$count}"]['main_is_primary'] = $mainValueCheck['is_primary'] ?? 0;
               $rows["move_location_{$blockName}_{$count}"]['location_entity'] = $blockName;
               $mainContactBlockId = $mainValueCheck['id'];
               break;