From 5a60bfa26e593c8760f2480ceb29ef56406e6b33 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 20 Nov 2023 14:50:18 +1300 Subject: [PATCH] Stop setting unused key Since this function does not use this key & params is not passed by reference the value is set & discarded --- CRM/Contribute/Form/Contribution/Main.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 90d939c4b1..8cc5bec5f5 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -1166,11 +1166,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $amountID = $params['amount'] ?? NULL; if ($amountID) { - // @todo - stop setting amount level in this function & call the CRM_Price_BAO_PriceSet::getAmountLevel - // function to get correct amount level consistently. Remove setting of the amount level in - // CRM_Price_BAO_PriceSet::processAmount. Extend the unit tests in CRM_Price_BAO_PriceSetTest - // to cover all variants. - $params['amount_level'] = $formValues[$amountID]['label'] ?? NULL; $amount = $formValues[$amountID]['value'] ?? NULL; } } -- 2.25.1