From: Eileen McNaughton Date: Thu, 27 Jul 2023 23:27:53 +0000 (+1200) Subject: Deprecate probably never true condition X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d623f8394ef1875faf976a5c6fb479aa5588856d;p=civicrm-core.git 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 --- 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) {