From: Eileen McNaughton Date: Mon, 20 Nov 2023 01:50:18 +0000 (+1300) Subject: Stop setting unused key X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5a60bfa26e593c8760f2480ceb29ef56406e6b33;p=civicrm-core.git Stop setting unused key Since this function does not use this key & params is not passed by reference the value is set & discarded --- 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; } }