From: Bradley Taylor Date: Sat, 18 Nov 2023 17:03:36 +0000 (+0000) Subject: [REF][PHP8.2] Declare donorEmail and donorDisplayName properties X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=80600a54e372b1b9555caee3f888fd0d84a7167a;p=civicrm-core.git [REF][PHP8.2] Declare donorEmail and donorDisplayName properties --- 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'));