From: monishdeb Date: Tue, 9 Sep 2014 12:21:14 +0000 (+0530) Subject: CRM-15250 fix - membership created and marked current when transaction declined ... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6e92ff36dc9d8d4ac86ef400ce725939b3a1d28c;p=civicrm-core.git CRM-15250 fix - membership created and marked current when transaction declined (authorize.net) https://issues.civicrm.org/jira/browse/CRM-15250 --- diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 3ce24572f0..3ba09975e3 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1315,7 +1315,7 @@ AND civicrm_membership.is_test = %2"; $form->_params['campaign_id'] = $membershipParams['onbehalf']['member_campaign_id']; } //@todo it should no longer be possible for it to get to this point & membership to not be an array - if (is_array($membershipTypeIDs)) { + if (is_array($membershipTypeIDs) && !empty($membershipContributionID)) { $typesTerms = CRM_Utils_Array::value('types_terms', $membershipParams, array()); foreach ($membershipTypeIDs as $memType) { $numTerms = CRM_Utils_Array::value($memType, $typesTerms, 1);