From aca8f88cb844a58b0148cbee7b448d3614617673 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Sun, 20 Mar 2022 20:53:20 +0000 Subject: [PATCH] Fix undefined index by making sure that is_template is always defined --- CRM/Contribute/Form/Contribution.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 7a58a71eb2..694b6b346c 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -280,16 +280,16 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $this->assignPremiumProduct($this->_id); $this->buildValuesAndAssignOnline_Note_Type($this->_id, $this->_values); } + if (!isset($this->_values['is_template'])) { + $this->_values['is_template'] = FALSE; + } + $this->assign('is_template', $this->_values['is_template']); // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { $this->applyCustomData('Contribution', $this->getFinancialTypeID(), $this->_id); } - if (!empty($this->_values['is_template'])) { - $this->assign('is_template', TRUE); - } - $this->_lineItems = []; if ($this->_id) { if (!empty($this->_compId) && $this->_compContext === 'participant') { -- 2.25.1