From e9cde32720ea5e38f8cdcf2da468ba6d190a6c42 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 3 Jun 2021 14:11:02 +1000 Subject: [PATCH] [REF][php8-compat] Further fixes where there is a required paramater after an optional paramater --- CRM/Contact/BAO/Query.php | 4 ++-- CRM/Utils/Weight.php | 2 +- api/v3/Profile.php | 2 +- tests/phpunit/CiviTest/CiviMailUtils.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index fce912aeec..fed122e101 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3130,7 +3130,7 @@ class CRM_Contact_BAO_Query { * @return string WHERE clause component for smart group criteria. * @throws \CRM_Core_Exception */ - public function addGroupContactCache($groups, $tableAlias, $joinTable = "contact_a", $op, $joinColumn = 'id') { + public function addGroupContactCache($groups, $tableAlias, $joinTable, $op, $joinColumn = 'id') { $isNullOp = (strpos($op, 'NULL') !== FALSE); $groupsIds = $groups; @@ -5909,7 +5909,7 @@ AND displayRelType.is_active = 1 $op, $value, $grouping, - $daoName = NULL, + $daoName, $field, $label, $dataType = 'String' diff --git a/CRM/Utils/Weight.php b/CRM/Utils/Weight.php index 47154d1f4d..d4961f7769 100644 --- a/CRM/Utils/Weight.php +++ b/CRM/Utils/Weight.php @@ -280,7 +280,7 @@ class CRM_Utils_Weight { public static function &query( $queryType, $daoName, - $fieldValues = NULL, + $fieldValues, $queryData, $additionalWhere = NULL, $orderBy = NULL, diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 59dbf268d2..84d642bf05 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -489,7 +489,7 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) { * * @return array|void */ -function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour = 1, $is_flush) { +function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour, $is_flush) { static $profileFields = []; if ($is_flush) { $profileFields = []; diff --git a/tests/phpunit/CiviTest/CiviMailUtils.php b/tests/phpunit/CiviTest/CiviMailUtils.php index b0a98b13e4..66b0a488c7 100644 --- a/tests/phpunit/CiviTest/CiviMailUtils.php +++ b/tests/phpunit/CiviTest/CiviMailUtils.php @@ -362,9 +362,9 @@ class CiviMailUtils extends PHPUnit\Framework\TestCase { * @param $mail * @return mixed */ - public function checkMailForStrings(array $strings, $absentStrings = [], $prefix = '', $mail) { + public function checkMailForStrings(array $strings, $absentStrings, $prefix, $mail) { foreach ($strings as $string) { - $this->_ut->assertContains($string, $mail, "$string . not found in $mail $prefix"); + $this->_ut->assertStringContainsString($string, $mail, "$string . not found in $mail $prefix"); } foreach ($absentStrings as $string) { $this->_ut->assertEmpty(strstr($mail, $string), "$string incorrectly found in $mail $prefix"); -- 2.25.1