From 80600a54e372b1b9555caee3f888fd0d84a7167a Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sat, 18 Nov 2023 17:03:36 +0000 Subject: [PATCH] [REF][PHP8.2] Declare donorEmail and donorDisplayName properties --- CRM/Contribute/Form/CancelSubscription.php | 7 +++++++ CRM/Contribute/Form/UpdateSubscription.php | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/CancelSubscription.php b/CRM/Contribute/Form/CancelSubscription.php index 8ce402c574..450132d244 100644 --- a/CRM/Contribute/Form/CancelSubscription.php +++ b/CRM/Contribute/Form/CancelSubscription.php @@ -28,6 +28,13 @@ class CRM_Contribute_Form_CancelSubscription extends CRM_Contribute_Form_Contrib */ protected $_donorEmail = ''; + /** + * The contributor display name (for emails) + * + * @var string + */ + protected $_donorDisplayName = ''; + /** * Should custom data be suppressed on this form. * diff --git a/CRM/Contribute/Form/UpdateSubscription.php b/CRM/Contribute/Form/UpdateSubscription.php index 459dbcd818..e68c618189 100644 --- a/CRM/Contribute/Form/UpdateSubscription.php +++ b/CRM/Contribute/Form/UpdateSubscription.php @@ -43,6 +43,13 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Contribute_Form_Contrib */ public $_contactID; + /** + * The contributor email + * + * @var string + */ + protected $_donorEmail = ''; + /** * Pre-processing for the form. * @@ -112,7 +119,8 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Contribute_Form_Contrib $this->assign('editableScheduleFields', array_diff($this->editableScheduleFields, $alreadyHardCodedFields)); if ($this->_subscriptionDetails->contact_id) { - [$this->_donorDisplayName, $this->_donorEmail] = CRM_Contact_BAO_Contact::getContactDetails($this->_subscriptionDetails->contact_id); + $contactDetails = CRM_Contact_BAO_Contact::getContactDetails($this->_subscriptionDetails->contact_id); + $this->_donorEmail = $contactDetails[1]; } $this->setTitle(ts('Update Recurring Contribution')); -- 2.25.1