Skip to content

Commit

Permalink
Merge pull request #14550 from eileenmcnaughton/null_fix
Browse files Browse the repository at this point in the history
dev/core#1047 Fix instance of NULL contamination
  • Loading branch information
seamuslee001 authored Jun 15, 2019
2 parents ff4f97e + 981e0d0 commit 8130453
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public static function getDefaults() {
* @return CRM_Contribute_BAO_Contribution|null
* The found object or null
*/
public static function getValues($params, &$values, &$ids) {
public static function getValues($params, &$values = [], &$ids = []) {
if (empty($params)) {
return NULL;
}
Expand Down Expand Up @@ -4493,8 +4493,7 @@ public static function completeOrder(&$input, &$ids, $objects, $transaction, $re
$primaryContributionID = isset($contribution->id) ? $contribution->id : $objects['first_contribution']->id;
// The previous details are used when calculating line items so keep it before any code that 'does something'
if (!empty($contribution->id)) {
$input['prevContribution'] = CRM_Contribute_BAO_Contribution::getValues(['id' => $contribution->id],
CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullArray);
$input['prevContribution'] = CRM_Contribute_BAO_Contribution::getValues(['id' => $contribution->id]);
}
$inputContributionWhiteList = [
'fee_amount',
Expand Down

0 comments on commit 8130453

Please sign in to comment.