From: Bradley Taylor Date: Sun, 3 Dec 2023 21:22:20 +0000 (+0000) Subject: [REF][PHP8.2] Resolve dynamic property usage in CRM_Price_Form_Option X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d7c393b70265d98733d3399fccd9a5d470036db9;p=civicrm-core.git [REF][PHP8.2] Resolve dynamic property usage in CRM_Price_Form_Option --- diff --git a/CRM/Price/Form/Option.php b/CRM/Price/Form/Option.php index 3aeecdc00f..fa66e12323 100644 --- a/CRM/Price/Form/Option.php +++ b/CRM/Price/Form/Option.php @@ -41,6 +41,13 @@ class CRM_Price_Form_Option extends CRM_Core_Form { */ protected $_moneyFields = ['amount', 'non_deductible_amount']; + /** + * price_set_id being edited + * + * @var int + */ + protected $_sid; + /** * Set variables up before form is built. * @@ -147,7 +154,6 @@ class CRM_Price_Form_Option extends CRM_Core_Form { ) { $this->_sid = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceField', $this->_fid, 'price_set_id', 'id'); } - $this->isEvent = FALSE; $extendComponentId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_sid, 'extends', 'id'); $this->assign('showMember', FALSE); if ($this->isComponentPriceOption($extendComponentId, 'CiviMember')) { @@ -161,7 +167,6 @@ class CRM_Price_Form_Option extends CRM_Core_Form { } else { if ($this->isComponentPriceOption($extendComponentId, 'CiviEvent')) { - $this->isEvent = TRUE; // count $this->add('number', 'count', ts('Participant Count')); $this->addRule('count', ts('Please enter a valid Max Participants.'), 'positiveInteger');