From 729245ca0ca3b38d51a1840bd8d70003e2c8cb13 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 21 Nov 2019 14:49:54 +1300 Subject: [PATCH] [REF] remove another unnecessary pass-by-reference the recur function is only called once. Immediately after it is called there is a return & the calling function has not passed in any variables by reference - ergo we gain nothing but confusion by using pass-by-ref here --- CRM/Core/Payment/PayPalIPN.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index 2628c678a8..a506ab3f29 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -72,18 +72,18 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { * @throws \CRM_Core_Exception * @throws \CiviCRM_API3_Exception */ - public function recur(&$input, &$ids, &$objects, $first) { + public function recur($input, $ids, $objects, $first) { if (!isset($input['txnType'])) { Civi::log()->debug('PayPalIPN: Could not find txn_type in input request'); echo "Failure: Invalid parameters

"; return; } - if ($input['txnType'] == 'subscr_payment' && - $input['paymentStatus'] != 'Completed' + if ($input['txnType'] === 'subscr_payment' && + $input['paymentStatus'] !== 'Completed' ) { Civi::log()->debug('PayPalIPN: Ignore all IPN payments that are not completed'); - echo "Failure: Invalid parameters

"; + echo 'Failure: Invalid parameters

'; return; } -- 2.25.1