From: eileen Date: Sun, 1 Nov 2020 23:45:36 +0000 (+1300) Subject: [Ref] Simplify params X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=67ff8c742e8eccdc9164428f54bc923ccf6f8280;p=civicrm-core.git [Ref] Simplify params As with https://github.com/civicrm/civicrm-core/commit/0d74d91cd340b9f1ea2224119c748e372dffe245 pass the retrieved parameters to the single function rather than the id of the object retrieved based on them --- diff --git a/CRM/Core/Payment/PayPalProIPN.php b/CRM/Core/Payment/PayPalProIPN.php index ff8cf08178..61c86b269e 100644 --- a/CRM/Core/Payment/PayPalProIPN.php +++ b/CRM/Core/Payment/PayPalProIPN.php @@ -459,8 +459,8 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr $this->single($input, [ 'related_contact' => $ids['related_contact'] ?? NULL, - 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL, - 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL, + 'participant' => $ids['participant'] ?? NULL, + 'contributionRecur' => $ids['contributionRecur'] ?? NULL, ], $objects, FALSE, FALSE); } catch (CRM_Core_Exception $e) {