From: Eileen McNaughton Date: Tue, 28 Nov 2023 20:36:54 +0000 (+1300) Subject: Add deprecation notices X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6040960aacc7aab0f58803ed226b8719b0892609;p=civicrm-core.git Add deprecation notices --- diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 9c925487f1..4db4746220 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -239,7 +239,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { */ public function __get($name) { if ($name === '_lineItem') { - // At some point add a deprecation notice here. + CRM_Core_Error::deprecatedWarning('attempt to access undefined property _lineItem - use externally supported function getLineItems()'); return [$this->getPriceSetID() => $this->getLineItems()]; } CRM_Core_Error::deprecatedWarning('attempt to access invalid property :' . $name); @@ -256,6 +256,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { */ public function __set($name, $value) { if ($name === '_lineItem') { + CRM_Core_Error::deprecatedWarning('attempt to access undefined property _lineItem - use externally supported function setLineItems()'); $this->order->setLineItems($value[$this->getPriceSetID()]); return; }