From: Maggie Date: Tue, 16 Sep 2014 20:33:44 +0000 (-0400) Subject: CRM-15320-created foreach loop so that it processes the array of arrays rather than... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a54e2c55d465c3a64f940eb711f9cd9cb34e015f;p=civicrm-core.git CRM-15320-created foreach loop so that it processes the array of arrays rather than dropping the contact id --- 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