From: eileen Date: Thu, 24 Dec 2015 00:16:33 +0000 (+1300) Subject: CRM-17655 editing recurring through form causes error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d4009c22ffc16fff3b1d1c56806a67ac41671898;p=civicrm-core.git CRM-17655 editing recurring through form causes error On editing I found previous patches for CRM-17655 had caused a situation where the ID for the recurring contribution was not always being correctly determined Change-Id: I74394d6f33b0a68ee73d0cc4be3efb5563bc6406 --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 46a830b7c1..74c6aefcff 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -201,7 +201,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { if (self::isUpdateToRecurringContribution($params)) { CRM_Contribute_BAO_ContributionRecur::updateOnNewPayment( - $params['contribution_recur_id'], + (!empty($params['contribution_recur_id']) ? $params['contribution_recur_id'] : $params['prevContribution']->contribution_recur_id), $contributionStatus[$params['contribution_status_id']] ); }