From: monishdeb Date: Wed, 29 Oct 2014 08:40:16 +0000 (+0530) Subject: CRM-15481 additional fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a1eedce54d252aef361f2e630ec7877346e59b51;p=civicrm-core.git CRM-15481 additional fix ---------------------------------------- * CRM-15481: Scheduled Reminders job failure with event reminders https://issues.civicrm.org/jira/browse/CRM-15481 --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 69d476e4d5..1fa15e87f6 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -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; + } } } }