From 0d74d91cd340b9f1ea2224119c748e372dffe245 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 30 Oct 2020 20:19:29 +1300 Subject: [PATCH] [Ref] Use direct version of participant id ids['Participant'] is taken from the url. It is then passed to loadRelatedObjects where https://github.com/civicrm/civicrm-core/blob/0bd5e6bfbe8f339dbe066e3e96e00760c93a57e2/CRM/Contribute/BAO/Contribution.php#L2890 loads an object based on it. We then set ids too the object's id - which is a long way around to using the paramter we started from. This does that --- CRM/Core/Payment/PayPalIPN.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index 9e1a6050e3..f605fffbbe 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -357,7 +357,7 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { } $this->single($input, [ 'related_contact' => $ids['related_contact'] ?? NULL, - 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL, + 'participant' => $ids['participant'] ?? NULL, 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL, ], $objects['contribution']); } -- 2.25.1