prevent error on $mainBlockId not set
authorJoe Murray <joe.murray@jmaconsulting.biz>
Thu, 6 Aug 2015 15:45:35 +0000 (11:45 -0400)
committerJoe Murray <joe.murray@jmaconsulting.biz>
Thu, 6 Aug 2015 15:45:35 +0000 (11:45 -0400)
This was in an override file on a site I am taking over and seems like it should be a core bug fix

CRM/Dedupe/Merger.php

index 8566e7a18344904072fd4fd2c95875ece70b70ad..119164cbbb178b02317546519464ca20059bfadd 100644 (file)
@@ -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);