From ad4611b56dc1bcba0d44d6d9eca44112d04c95f5 Mon Sep 17 00:00:00 2001 From: eileen Date: Sun, 14 Mar 2021 15:52:21 +1300 Subject: [PATCH] [REF] Remove setting on unused variables The removed line sets membershipValues[x]['frequency_interval'] and membershipValues[x]['frequency_duration'] However I can see no evidence these are ever used anymore. The membershipValues array is an array of values to pass to the membership create action which does not reference them at all. They ARE referenced from the legacyProcessRecurringContribution as they defined the frequency of these - but they take the value set in formValues which is not removed Removing this one line opens up quite a lot more simplification and I can't see any evidence it plays a function these days --- CRM/Member/Form/Membership.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 68cc82b751..7829965eb5 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1035,8 +1035,6 @@ DESC limit 1"); 'frequency_interval' => 'duration_interval', 'frequency_unit' => 'duration_unit', ] as $mapVal => $mapParam) { - $membershipTypeValues[$memType][$mapVal] = $recurMembershipTypeValues[$mapParam]; - if (!$count) { $formValues[$mapVal] = CRM_Utils_Array::value($mapParam, $recurMembershipTypeValues -- 2.25.1