[REF][php8-compat] Further fixes where there is a required paramater after an optiona...
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 3 Jun 2021 04:11:02 +0000 (14:11 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 3 Jun 2021 04:11:02 +0000 (14:11 +1000)
CRM/Contact/BAO/Query.php
CRM/Utils/Weight.php
api/v3/Profile.php
tests/phpunit/CiviTest/CiviMailUtils.php

index fce912aeec9ea029b29d3e9fd84a148f470824ac..fed122e1011eae45097049c5c99f90a1721460f2 100644 (file)
@@ -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'
index 47154d1f4d03fade0b25e3dbb0bbf3f4fd332397..d4961f776993af8ca81455972eef4bf3d1858198 100644 (file)
@@ -280,7 +280,7 @@ class CRM_Utils_Weight {
   public static function &query(
     $queryType,
     $daoName,
-    $fieldValues = NULL,
+    $fieldValues,
     $queryData,
     $additionalWhere = NULL,
     $orderBy = NULL,
index 59dbf268d2bbcbd21ab7359cf391c25374e990d6..84d642bf05b683685691d36e4d556bfd3f6ce422 100644 (file)
@@ -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 = [];
index b0a98b13e4dbfb6cfecddd609ec09123e5e2612b..66b0a488c7e1a9690f055bd66fba4453eb7df82d 100644 (file)
@@ -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");