Skip to content
Snippets Groups Projects
Commit e3f3156b authored by eileen's avatar eileen
Browse files

CRM-12042 edge case protection

parent 175a5979
Branches
Tags
No related merge requests found
......@@ -725,6 +725,11 @@ LIMIT 1;";
// we have a pledge now we need to get the oldest unpaid payment
$paymentDetails = CRM_Pledge_BAO_PledgePayment::getOldestPledgePayment($pledgeId);
if(empty($paymentDetails['id'])){
// we can assume this pledge is now completed
// return now so we don't create a core error & roll back
return;
}
$paymentDetails['contribution_id'] = $contribution->id;
$paymentDetails['status_id'] = $contribution->contribution_status_id;
$paymentDetails['actual_amount'] = $contribution->total_amount;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment