From a7cc055e609fa74da47c9124436deb2272f82974 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 19 Jul 2015 22:24:25 +1200 Subject: [PATCH] CRM-16867 saving membership types is blocked when key for a renew type is present - even when the type has just been disabled --- CRM/Member/Form/MembershipBlock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Member/Form/MembershipBlock.php b/CRM/Member/Form/MembershipBlock.php index 1103a75524..33bdb359fe 100644 --- a/CRM/Member/Form/MembershipBlock.php +++ b/CRM/Member/Form/MembershipBlock.php @@ -302,8 +302,8 @@ class CRM_Member_Form_MembershipBlock extends CRM_Contribute_Form_ContributionPa $errors['is_separate_payment'] = ts('You need to enable Separate Membership Payment when online contribution page is configured for both Membership and Recurring Contribution'); } elseif (!empty($params['is_separate_payment'])) { - foreach ($params['membership_type'] as $mt => $dontCare) { - if (!empty($params["auto_renew_$mt"])) { + foreach ($params['membership_type'] as $mt => $isEnabled) { + if (!empty($params["auto_renew_$mt"]) && $isEnabled) { $errors["auto_renew_$mt"] = ts('You cannot enable both Recurring Contributions and Auto-renew memberships on the same online contribution page'); break; } -- 2.25.1