From a54e2c55d465c3a64f940eb711f9cd9cb34e015f Mon Sep 17 00:00:00 2001 From: Maggie Date: Tue, 16 Sep 2014 16:33:44 -0400 Subject: [PATCH] CRM-15320-created foreach loop so that it processes the array of arrays rather than dropping the contact id --- CRM/Member/BAO/Membership.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 12860a568c..77bcf4a06e 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -2852,10 +2852,12 @@ WHERE civicrm_membership.is_test = 0"; //CRM-13981, create new soft-credit record as to record payment from different person for this membership if (!empty($contributionSoftParams)) { - $contributionSoftParams['contribution_id'] = $contribution->id; - $contributionSoftParams['currency'] = $contribution->currency; - $contributionSoftParams['amount'] = $contribution->total_amount; - CRM_Contribute_BAO_ContributionSoft::add($contributionSoftParams); + foreach ($contributionSoftParams as $contributionSoft){ + $contributionSoft['contribution_id'] = $contribution->id; + $contributionSoft['currency'] = $contribution->currency; + $contributionSoft['amount'] = $contribution->total_amount; + CRM_Contribute_BAO_ContributionSoft::add($contributionSoft); + } } // store contribution id -- 2.25.1