From: eileenmcnaughton Date: Wed, 29 Jul 2015 09:09:42 +0000 (+0000) Subject: CRM-16923 refine setting of enotices on dodgey setting of processor X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ef6ae9af4736bee400d176ada68a911c8bf02aa2;p=civicrm-core.git CRM-16923 refine setting of enotices on dodgey setting of processor --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 2e7d984c6c..a66437c8bf 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2091,7 +2091,9 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac $this->contribution_page_id, 'payment_processor' ); - $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage; + if ($paymentProcessorID) { + $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage; + } } if (!empty($ids['contributionRecur'])) { @@ -2209,7 +2211,9 @@ WHERE contribution_id = %1 "; // in future we should look at throwing an exception here rather than an dubious guess. if (!$paymentProcessorID) { $paymentProcessorID = $this->_relatedObjects['event']->payment_processor; - $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromEvent; + if ($paymentProcessorID) { + $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromEvent; + } } }