From 7b4b0b68aaabb041203edafabfadccdb90559521 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 17 Jun 2019 14:32:49 +1000 Subject: [PATCH] Remove unncessary usage of CRM_Core_DAO::$_nullArray when calling createProfileContact function And annother instance --- CRM/Core/BAO/UFMatch.php | 2 +- CRM/Friend/BAO/Friend.php | 2 +- tests/phpunit/CRM/Contribute/BAO/ContributionTest.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Core/BAO/UFMatch.php b/CRM/Core/BAO/UFMatch.php index 778dd29f42..83713e6cf5 100644 --- a/CRM/Core/BAO/UFMatch.php +++ b/CRM/Core/BAO/UFMatch.php @@ -296,7 +296,7 @@ AND domain_id = %2 } } - $contactId = CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray); + $contactId = CRM_Contact_BAO_Contact::createProfileContact($params); $ufmatch->contact_id = $contactId; $ufmatch->uf_name = $uniqId; } diff --git a/CRM/Friend/BAO/Friend.php b/CRM/Friend/BAO/Friend.php index b817cae909..2e8328255d 100644 --- a/CRM/Friend/BAO/Friend.php +++ b/CRM/Friend/BAO/Friend.php @@ -64,7 +64,7 @@ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend { * @return int */ public static function add(&$params) { - return CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray); + return CRM_Contact_BAO_Contact::createProfileContact($params); } /** diff --git a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php index c18d4d1823..434ef29390 100644 --- a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php @@ -245,7 +245,8 @@ class CRM_Contribute_BAO_ContributionTest extends CiviUnitTestCase { ); $softParam = array('soft_credit_type_id' => 1); - $honoreeContactId = CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray, + $null = []; + $honoreeContactId = CRM_Contact_BAO_Contact::createProfileContact($params, $null, NULL, NULL, $honoreeProfileId ); -- 2.25.1