Skip to content

Commit

Permalink
Remove deprecated ids param
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Sep 5, 2020
1 parent 30bd3f9 commit 070dadd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,12 @@ public function __construct() {
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
public static function add(&$params, $ids = []) {
public static function add(&$params) {
if (empty($params)) {
return NULL;
}
if (!empty($ids)) {
CRM_Core_Error::deprecatedFunctionWarning('ids should not be passed into Contribution.add');
}
//per http://wiki.civicrm.org/confluence/display/CRM/Database+layer we are moving away from $ids array
$contributionID = CRM_Utils_Array::value('contribution', $ids, CRM_Utils_Array::value('id', $params));

$contributionID = $params['id'] ?? NULL;
$action = $contributionID ? 'edit' : 'create';
$duplicates = [];
if (self::checkDuplicate($params, $duplicates, $contributionID)) {
Expand Down

0 comments on commit 070dadd

Please sign in to comment.