Skip to content

Commit

Permalink
Merge pull request #22993 from mattwire/is_templateundefined
Browse files Browse the repository at this point in the history
Fix undefined index by making sure that is_template is always defined
  • Loading branch information
eileenmcnaughton authored Mar 21, 2022
2 parents 7ae979d + aca8f88 commit bea0b08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Contribute/Form/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,16 @@ public function preProcess() {
$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') {
Expand Down

0 comments on commit bea0b08

Please sign in to comment.