Skip to content

Commit

Permalink
Merge pull request #16075 from seamuslee001/sig_status_bounce
Browse files Browse the repository at this point in the history
[REF] Convert more petition signature fatals to status bounce
  • Loading branch information
seamuslee001 authored Dec 11, 2019
2 parents ee3bab5 + 0082383 commit aae460f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CRM/Campaign/Form/Petition/Signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ public function preProcess() {

//some sanity checks
if (!$this->_surveyId) {
CRM_Core_Error::fatal('Petition id is not valid. (it needs a "sid" in the url).');
CRM_Core_Error::statusBounce('Petition id is not valid. (it needs a "sid" in the url).');
return;
}
//check petition is valid and active
$params['id'] = $this->_surveyId;
$this->petition = [];
CRM_Campaign_BAO_Survey::retrieve($params, $this->petition);
if (empty($this->petition)) {
CRM_Core_Error::fatal('Petition doesn\'t exist.');
CRM_Core_Error::statusBounce('Petition doesn\'t exist.');
}
if ($this->petition['is_active'] == 0) {
CRM_Core_Error::statusBounce('Petition is no longer active.');
Expand Down Expand Up @@ -197,7 +197,7 @@ public function preProcess() {
$this->_contactProfileFields = CRM_Core_BAO_UFGroup::getFields($this->_contactProfileId, FALSE, CRM_Core_Action::ADD);
}
if (!isset($this->_contactProfileFields['email-Primary'])) {
CRM_Core_Error::fatal('The contact profile needs to contain the primary email address field');
CRM_Core_Error::statusBounce('The contact profile needs to contain the primary email address field');
}

$ufJoinParams['weight'] = 1;
Expand Down

0 comments on commit aae460f

Please sign in to comment.