Remove unused passbyreference and var from ipn_process_transaction
authorMatthew Wire <mjw@mjwconsult.co.uk>
Tue, 1 Sep 2020 21:41:21 +0000 (22:41 +0100)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Tue, 1 Sep 2020 21:41:42 +0000 (22:41 +0100)
api/v3/Contribution.php

index 63036179825e31b851b6845146a47e4a5ac217db..aa3d7f156cb8f0e542ee0b8902c1a1d7697985a6 100644 (file)
@@ -602,7 +602,6 @@ function civicrm_api3_contribution_repeattransaction($params) {
     );
   }
 
-  $original_contribution = clone $contribution;
   $input['payment_processor_id'] = civicrm_api3('contributionRecur', 'getvalue', [
     'return' => 'payment_processor_id',
     'id' => $contribution->contribution_recur_id,
@@ -626,7 +625,7 @@ function civicrm_api3_contribution_repeattransaction($params) {
     ];
     $input = array_intersect_key($params, array_fill_keys($passThroughParams, NULL));
 
-    return _ipn_process_transaction($params, $contribution, $input, $ids, $original_contribution);
+    return _ipn_process_transaction($params, $contribution, $input, $ids);
   }
   catch (Exception $e) {
     throw new API_Exception('failed to load related objects' . $e->getMessage() . "\n" . $e->getTraceAsString());
@@ -645,13 +644,11 @@ function civicrm_api3_contribution_repeattransaction($params) {
  *
  * @param array $ids
  *
- * @param CRM_Contribute_BAO_Contribution $firstContribution
- *
  * @return mixed
  * @throws \CRM_Core_Exception
  * @throws \CiviCRM_API3_Exception
  */
-function _ipn_process_transaction(&$params, $contribution, $input, $ids, $firstContribution = NULL) {
+function _ipn_process_transaction($params, $contribution, $input, $ids) {
   $objects = $contribution->_relatedObjects;
   $objects['contribution'] = &$contribution;
   $input['component'] = $contribution->_component;