From cf348a5ee8df25ba9e17cdada856102c644c8785 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 2 Jun 2021 15:22:01 +1000 Subject: [PATCH] [php8-compat] Fix deprecation error where by required function parameter follows an optional function parameter --- CRM/Activity/BAO/Activity.php | 4 ++-- CRM/Batch/BAO/Batch.php | 2 +- CRM/Case/BAO/Case.php | 6 +++--- CRM/Contribute/BAO/ContributionPage.php | 2 +- CRM/Core/BAO/Setting.php | 2 +- CRM/Mailing/BAO/Mailing.php | 2 +- CRM/Mailing/Event/BAO/TrackableURLOpen.php | 4 ++-- CRM/Mailing/Event/BAO/Unsubscribe.php | 2 +- CRM/Price/BAO/LineItem.php | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index a4850929e9..287346602c 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -1265,7 +1265,7 @@ WHERE entity_id =%1 AND entity_table = %2"; * @throws CRM_Core_Exception */ public static function sendSMS( - &$contactDetails = NULL, + &$contactDetails, &$activityParams, &$smsProviderParams = [], &$contactIds = NULL, @@ -1417,7 +1417,7 @@ WHERE entity_id =%1 AND entity_table = %2"; public static function sendSMSMessage( $toID, &$tokenText, - $smsProviderParams = [], + $smsProviderParams, $activityID, $sourceContactID = NULL ) { diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index c2cba49cda..91177016e2 100644 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -617,7 +617,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { * @param array $batchIds * @param $status */ - public static function closeReOpen($batchIds = [], $status) { + public static function closeReOpen($batchIds, $status) { $batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id'); $params['status_id'] = CRM_Utils_Array::key($status, $batchStatus); $session = CRM_Core_Session::singleton(); diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index a7d10036a9..1b10f46331 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -400,7 +400,7 @@ WHERE cc.contact_id = %1 AND civicrm_case_type.name = '{$caseType}'"; * * @return string */ - public static function getCaseActivityCountQuery($type = 'upcoming', $userID, $condition = NULL) { + public static function getCaseActivityCountQuery($type, $userID, $condition = NULL) { return sprintf(" SELECT COUNT(*) FROM (%s) temp ", self::getCaseActivityQuery($type, $userID, $condition)); } @@ -413,7 +413,7 @@ WHERE cc.contact_id = %1 AND civicrm_case_type.name = '{$caseType}'"; * * @return string */ - public static function getCaseActivityQuery($type = 'upcoming', $userID, $condition = NULL, $limit = NULL, $order = NULL) { + public static function getCaseActivityQuery($type, $userID, $condition = NULL, $limit = NULL, $order = NULL) { $selectClauses = [ 'civicrm_case.id as case_id', 'civicrm_case.subject as case_subject', @@ -1258,7 +1258,7 @@ HERESQL; * * @return bool |array */ - public static function sendActivityCopy($clientId, $activityId, $contacts, $attachments = NULL, $caseId) { + public static function sendActivityCopy($clientId, $activityId, $contacts, $attachments, $caseId) { if (!$activityId) { return FALSE; } diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index e33bbdd67a..d5bfdb00a4 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -831,7 +831,7 @@ LEFT JOIN civicrm_premiums ON ( civicrm_premiums.entity_id = civicrm * * @return array|string */ - public static function formatModuleData($params, $setDefault = FALSE, $module) { + public static function formatModuleData($params, $setDefault, $module) { $tsLocale = CRM_Core_I18n::getLocale(); $config = CRM_Core_Config::singleton(); $json = $jsonDecode = NULL; diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index f075a24957..2329a21acb 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -96,7 +96,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @return array */ - public static function getItems(&$params, $domains = NULL, $settingsToReturn) { + public static function getItems(&$params, $domains, $settingsToReturn) { $originalDomain = CRM_Core_Config::domainID(); if (empty($domains)) { $domains[] = $originalDomain; diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 269bf3d8ea..576a5cfffd 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1327,7 +1327,7 @@ ORDER BY civicrm_email.is_bulkmail DESC * * @return bool|mixed|null|string */ - private function getTokenData(&$token_a, $html = FALSE, &$contact, &$verp, &$urls, $event_queue_id) { + private function getTokenData(&$token_a, $html, &$contact, &$verp, &$urls, $event_queue_id) { $type = $token_a['type']; $token = $token_a['token']; $data = $token; diff --git a/CRM/Mailing/Event/BAO/TrackableURLOpen.php b/CRM/Mailing/Event/BAO/TrackableURLOpen.php index 856f577edb..530fa1ece3 100644 --- a/CRM/Mailing/Event/BAO/TrackableURLOpen.php +++ b/CRM/Mailing/Event/BAO/TrackableURLOpen.php @@ -271,8 +271,8 @@ class CRM_Mailing_Event_BAO_TrackableURLOpen extends CRM_Mailing_Event_DAO_Track * Result set */ public static function &getRows( - $mailing_id, $job_id = NULL, - $is_distinct = FALSE, $url_id, + $mailing_id, $job_id, + $is_distinct, $url_id, $offset = NULL, $rowCount = NULL, $sort = NULL, $contact_id = NULL ) { diff --git a/CRM/Mailing/Event/BAO/Unsubscribe.php b/CRM/Mailing/Event/BAO/Unsubscribe.php index ee26c8c76a..ff7415fa4e 100644 --- a/CRM/Mailing/Event/BAO/Unsubscribe.php +++ b/CRM/Mailing/Event/BAO/Unsubscribe.php @@ -299,7 +299,7 @@ WHERE email = %2 * @param int $job * The job ID. */ - public static function send_unsub_response($queue_id, $groups, $is_domain = FALSE, $job) { + public static function send_unsub_response($queue_id, $groups, $is_domain, $job) { $config = CRM_Core_Config::singleton(); $domain = CRM_Core_BAO_Domain::getDomain(); $jobObject = new CRM_Mailing_BAO_MailingJob(); diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index 0d6f12c6a8..2d36aa9e62 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -424,7 +424,7 @@ WHERE li.contribution_id = %1"; * @param $amount * @param array $otherParams */ - public static function syncLineItems($entityId, $entityTable = 'civicrm_contribution', $amount, $otherParams = NULL) { + public static function syncLineItems($entityId, $entityTable, $amount, $otherParams = NULL) { if (!$entityId || CRM_Utils_System::isNull($amount)) { return; } -- 2.25.1