From d623f8394ef1875faf976a5c6fb479aa5588856d Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 28 Jul 2023 11:27:53 +1200 Subject: [PATCH] Deprecate probably never true condition If we can clarify that price set is ALWAYS set it will simplify stuff - comments suggest that the exception has been weird test config --- CRM/Contribute/Form/ContributionBase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index c993912f98..2fee4a089a 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -360,6 +360,9 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { $this->order = new CRM_Financial_BAO_Order(); $this->order->setPriceSetID($this->getPriceSetID()); } + else { + CRM_Core_Error::deprecatedFunctionWarning('forms require a price set it'); + } $this->_priceSet = $this->get('priceSet'); if (!$this->_values) { -- 2.25.1