From: Joe Murray Date: Thu, 6 Aug 2015 15:45:35 +0000 (-0400) Subject: prevent error on $mainBlockId not set X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0999c6c063b1e1f40d873e608d119d7456af59f9;p=civicrm-core.git prevent error on $mainBlockId not set This was in an override file on a site I am taking over and seems like it should be a core bug fix --- diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 8566e7a183..119164cbbb 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -1315,7 +1315,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m } // overwrite - need to delete block which belongs to main-contact. - if ($mainBlockId && ($operation == 2)) { + if (isset($mainBlockId) && $mainBlockId && ($operation == 2)) { $deleteDAO = new $daoName(); $deleteDAO->id = $mainBlockId; $deleteDAO->find(TRUE);