CRM-15481 additional fix
authormonishdeb <monish.deb@webaccessglobal.com>
Wed, 29 Oct 2014 08:40:16 +0000 (14:10 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 29 Oct 2014 08:40:16 +0000 (14:10 +0530)
----------------------------------------
* CRM-15481: Scheduled Reminders job failure with event reminders
  https://issues.civicrm.org/jira/browse/CRM-15481

CRM/Contribute/BAO/Contribution.php

index 69d476e4d54b1d201b315cf47cf87824821d1baa..1fa15e87f674e0149f8b8161fa6bef0101901d9d 100644 (file)
@@ -3359,8 +3359,12 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']})
 
       if (!$contributionId) {
         if ($primaryParticipantId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_Participant', $id, 'registered_by_id')) {
-          $contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $primaryParticipantId, 'contribution_id', 'participant_id');
-          $id = $primaryParticipantId;
+          if ($contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $primaryParticipantId, 'contribution_id', 'participant_id')) {
+            $id = $primaryParticipantId;
+          }
+          else {
+            return;
+          }
         }
       }
     }