CRM/Report - Refactor unnecessary uses of CRM_Utils_Array::value
authorcolemanw <coleman@civicrm.org>
Fri, 13 Oct 2023 23:40:17 +0000 (19:40 -0400)
committercolemanw <coleman@civicrm.org>
Mon, 23 Oct 2023 13:08:56 +0000 (09:08 -0400)
24 files changed:
CRM/Report/BAO/ReportInstance.php
CRM/Report/Form.php
CRM/Report/Form/Campaign/SurveyDetails.php
CRM/Report/Form/Case/Demographics.php
CRM/Report/Form/Case/Detail.php
CRM/Report/Form/Case/TimeSpent.php
CRM/Report/Form/Contact/CurrentEmployer.php
CRM/Report/Form/Contact/Detail.php
CRM/Report/Form/Contact/Log.php
CRM/Report/Form/Contact/Relationship.php
CRM/Report/Form/Contribute/History.php
CRM/Report/Form/Contribute/HouseholdSummary.php
CRM/Report/Form/Contribute/Lybunt.php
CRM/Report/Form/Contribute/OrganizationSummary.php
CRM/Report/Form/Contribute/PCP.php
CRM/Report/Form/Contribute/Repeat.php
CRM/Report/Form/Contribute/Sybunt.php
CRM/Report/Form/Contribute/TopDonor.php
CRM/Report/Form/Event/IncomeCountSummary.php
CRM/Report/Form/Mailing/Bounce.php
CRM/Report/Form/Mailing/Summary.php
CRM/Report/Form/Member/Lapse.php
CRM/Report/Form/Membership/Summary.php
CRM/Report/Form/Walklist/Walklist.php

index 1e183b19a9cbbc2a580c0625512c9852d93c0aa6..5024788f40ccfd31e18ca163e826cd0ad2d1332a 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance implem
     }
 
     if (!$instanceID || !isset($params['id'])) {
-      $params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, FALSE);
+      $params['is_reserved'] = $params['is_reserved'] ?? FALSE;
       $params['domain_id'] = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());
       // CRM-17256 set created_id on report creation.
       $params['created_id'] = $params['created_id'] ?? CRM_Core_Session::getLoggedInContactID();
index 29f0a4dad8972f178f98c4c2cb0998fe0da5d76c..2c2605ce4f4d7741ebe2cbde5db3981ff67d194c 100644 (file)
@@ -1084,7 +1084,7 @@ class CRM_Report_Form extends CRM_Core_Form {
             $order_by = [
               'column' => $fieldName,
               'order' => CRM_Utils_Array::value('default_order', $field, 'ASC'),
-              'section' => CRM_Utils_Array::value('default_is_section', $field, 0),
+              'section' => $field['default_is_section'] ?? 0,
             ];
 
             if (!empty($field['default_weight'])) {
@@ -3531,8 +3531,9 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
                     $val[$key] = $options[$valIds];
                   }
                 }
-                $pair[$op] = (count($val) == 1) ? (($op == 'notin' || $op ==
-                  'mnot') ? ts('Is Not') : ts('Is')) : CRM_Utils_Array::value($op, $pair);
+                $pair[$op] = (count($val) == 1) ?
+                  (($op == 'notin' || $op == 'mnot') ? ts('Is Not') : ts('Is')) :
+                  ($pair[$op] ?? '');
                 $val = implode(', ', $val);
                 $value = "{$pair[$op]} " . $val;
               }
@@ -3540,8 +3541,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
                 isset($field['options']) &&
                 is_array($field['options']) && !empty($field['options'])
               ) {
-                $value = ($pair[$op] ?? '') . " " .
-                  CRM_Utils_Array::value($val, $field['options'], $val);
+                $value = ($pair[$op] ?? '') . ' ' . ($field['options'][$val] ?? $val);
               }
               elseif ($val || $val == '0') {
                 $value = ($pair[$op] ?? '') . " " . $val;
@@ -3649,8 +3649,8 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
   public function compileContent() {
     $templateFile = $this->getHookedTemplateFileName();
     return ($this->_formValues['report_header'] ?? '') .
-    CRM_Core_Form::$_template->fetch($templateFile) .
-    CRM_Utils_Array::value('report_footer', $this->_formValues);
+      CRM_Core_Form::$_template->fetch($templateFile) .
+      ($this->_formValues['report_footer'] ?? '');
   }
 
   /**
@@ -5038,7 +5038,7 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
       'is_deceased' => [
         'title' => ts('Deceased'),
         'type' => CRM_Utils_Type::T_BOOLEAN,
-        'default' => CRM_Utils_Array::value('deceased', $defaults, 0),
+        'default' => $defaults['deceased'] ?? 0,
       ],
       'do_not_email' => [
         'title' => ts('Do not email'),
index 0f8cc4fc343f81284e016966f0fc2e3aa2b29050..fe56fbdc8053c3b4fe486c30fba59663bf426e74 100644 (file)
@@ -318,9 +318,9 @@ class CRM_Report_Form_Campaign_SurveyDetails extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
@@ -357,11 +357,11 @@ class CRM_Report_Form_Campaign_SurveyDetails extends CRM_Report_Form {
 
   public function compileContent() {
     $coverSheet = $this->_surveyCoverSheet() .
-        "<div style=\"page-break-after: always\"></div>";
+      "<div style=\"page-break-after: always\"></div>";
     $templateFile = $this->getHookedTemplateFileName();
     return $coverSheet .
       CRM_Core_Form::$_template->fetch($templateFile) .
-      CRM_Utils_Array::value('report_footer', $this->_formValues);
+      ($this->_formValues['report_footer'] ?? '');
   }
 
   /**
index bba34f581024f23e494ae0e374ee6f1584914c9e..0ef45be865c3283da03059d5bc1d5d0bf24b864b 100644 (file)
@@ -329,9 +329,9 @@ where (cg.extends='Contact' OR cg.extends='Individual' OR cg.extends_entity_colu
               else {
                 $clause = $this->whereClause($field,
                   $op,
-                  CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                  $this->_params["{$fieldName}_value"] ?? NULL,
+                  $this->_params["{$fieldName}_min"] ?? NULL,
+                  $this->_params["{$fieldName}_max"] ?? NULL
                 );
               }
             }
index f6307b1656094b14c23dcec4aa4fb3663cce7892..bc90feede728912de0798247e18b2be2c72c163a 100644 (file)
@@ -449,8 +449,8 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
                 CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
               );
             }
index 432bf8d7061b22ce96c965feebddd7196d2f4c99..fb929b7a04dae4e0c751da0cd29f6fb5e49e7935 100644 (file)
@@ -262,9 +262,9 @@ class CRM_Report_Form_Case_TimeSpent extends CRM_Report_Form {
               else {
                 $clause = $this->whereClause($field,
                   $op,
-                  CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                  $this->_params["{$fieldName}_value"] ?? NULL,
+                  $this->_params["{$fieldName}_min"] ?? NULL,
+                  $this->_params["{$fieldName}_max"] ?? NULL
                 );
               }
             }
index be2d0ef48cb25612217eab553a375fd4fd58602d..d04f9b9a0887a02ee4dbe2c4e32564e689284aff 100644 (file)
@@ -249,9 +249,9 @@ FROM civicrm_contact {$this->_aliases['civicrm_contact']}
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index ac71cce24596df9b0d59b689efd24053e652c86f..e1348f6c31ec7447a2864c49f8dcc79a6efb6502 100644 (file)
@@ -606,9 +606,9 @@ HERESQL;
             $op = $this->_params["{$fieldName}_op"] ?? NULL;
             $clause = $this->whereClause($field,
               $op,
-              CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-              CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-              CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+              $this->_params["{$fieldName}_value"] ?? NULL,
+              $this->_params["{$fieldName}_min"] ?? NULL,
+              $this->_params["{$fieldName}_max"] ?? NULL
             );
           }
           if (!empty($clause)) {
index 65589629d73f35b2b3fd88f731a59634ae52fc3e..652b3ad6a066c0b08731d3c853c11045d4479e9d 100644 (file)
@@ -194,9 +194,9 @@ class CRM_Report_Form_Contact_Log extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index 4cc4512c716d8adc22535ca8d4d9343e7ce2de9e..62240a6010d2b8bec89e48508705408c1f0718f5 100644 (file)
@@ -485,8 +485,8 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
                   $clause = $this->whereClause($field,
                     $op,
                     $contactTypes,
-                    CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                    CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                    $this->_params["{$fieldName}_min"] ?? NULL,
+                    $this->_params["{$fieldName}_max"] ?? NULL
                   );
                 }
 
@@ -496,8 +496,8 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
                   $subTypeClause = $this->whereClause($field,
                     $op,
                     $contactSubTypes,
-                    CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                    CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                    $this->_params["{$fieldName}_min"] ?? NULL,
+                    $this->_params["{$fieldName}_max"] ?? NULL
                   );
                   if ($clause) {
                     $clause = '(' . $clause . ' OR ' . $subTypeClause . ')';
@@ -514,9 +514,9 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
                 else {
                   $clause = $this->whereClause($field,
                     $op,
-                    CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                    CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                    CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                    $this->_params["{$fieldName}_value"] ?? NULL,
+                    $this->_params["{$fieldName}_min"] ?? NULL,
+                    $this->_params["{$fieldName}_max"] ?? NULL
                   );
                 }
               }
index fb2141aa221f8660acf2e5d85f78f3f0d427c1e9..658db8e0ffeb9cb4463173a2daaa4c325c46cba4 100644 (file)
@@ -424,9 +424,9 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
@@ -661,7 +661,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
       $total = [];
       $total['civicrm_contact_sort_name'] = ts('Total');
       foreach ($summaryYears as $year) {
-        $total[$year] = CRM_Utils_Array::value($year, $primaryRow, 0);
+        $total[$year] = $primaryRow[$year] ?? 0;
       }
 
       $relatedContact = FALSE;
@@ -673,7 +673,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
         $relatedContact = TRUE;
         $relatedRow = $relatedContributions[$relcid];
         foreach ($summaryYears as $year) {
-          $total[$year] += CRM_Utils_Array::value($year, $relatedRow, 0);
+          $total[$year] += $relatedRow[$year] ?? 0;
         }
 
         foreach (array_keys($this->_relationshipColumns) as $col) {
index 474ce68efcfb36d2f0b822967398b5aea003e316..4003b58cee10960cf0ffe74b01949a1ac8fb3d8d 100644 (file)
@@ -273,9 +273,9 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
               else {
                 $clause = $this->whereClause($field,
                   $op,
-                  CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                  $this->_params["{$fieldName}_value"] ?? NULL,
+                  $this->_params["{$fieldName}_min"] ?? NULL,
+                  $this->_params["{$fieldName}_max"] ?? NULL
                 );
               }
             }
index a8ec85026199c97c276b2ffb8284b20364160572..ee3c8d808ea9d82b05ed74154ea6f0a8104b5d6c 100644 (file)
@@ -644,9 +644,9 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     foreach ($rows as $key => $row) {
       // The final row contains the totals so we don't need to include it here.
       if (!empty($row['civicrm_contribution_contact_id'])) {
-        $display['life_time'] = CRM_Utils_Array::value('life_time', $display) +
+        $display['life_time'] = ($display['life_time'] ?? 0) +
           $row['civicrm_contribution_civicrm_life_time_total'];
-        $display[$previous_year] = CRM_Utils_Array::value($previous_year, $display) + $row['civicrm_contribution_last_year_total_amount'];
+        $display[$previous_year] = ($display[$previous_year] ?? 0) + $row['civicrm_contribution_last_year_total_amount'];
       }
     }
 
index 109eb68841b20438a33f97d03b7c9615dad923c0..ad54d42e08cac6330998666f12a19d62d9dc533b 100644 (file)
@@ -291,9 +291,9 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form {
               else {
                 $clause = $this->whereClause($field,
                   $op,
-                  CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                  $this->_params["{$fieldName}_value"] ?? NULL,
+                  $this->_params["{$fieldName}_min"] ?? NULL,
+                  $this->_params["{$fieldName}_max"] ?? NULL
                 );
               }
             }
index f3effc38a379bc56b45413d059424cb31d354ea0..ba48655fa0fbe2fe207c9fd3dddfa2f023bc8afa 100644 (file)
@@ -259,9 +259,9 @@ LEFT JOIN civicrm_event {$this->_aliases['civicrm_event']}
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index f5e33a14ef45a01c27fcc487eb40e42ecc6c3d84..ea83b16e7da62f5ff925e3b1e04c90927554885d 100644 (file)
@@ -407,9 +407,9 @@ LEFT JOIN $this->tempTableRepeat2 {$this->_aliases['civicrm_contribution']}2
         if ($op) {
           $clause = $this->whereClause($field,
             $op,
-            CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-            CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-            CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+            $this->_params["{$fieldName}_value"] ?? NULL,
+            $this->_params["{$fieldName}_min"] ?? NULL,
+            $this->_params["{$fieldName}_max"] ?? NULL
           );
         }
       }
@@ -464,9 +464,9 @@ LEFT JOIN $this->tempTableRepeat2 {$this->_aliases['civicrm_contribution']}2
           if ($op) {
             $clause = $this->whereClause($field,
               $op,
-              CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-              CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-              CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+              $this->_params["{$fieldName}_value"] ?? NULL,
+              $this->_params["{$fieldName}_min"] ?? NULL,
+              $this->_params["{$fieldName}_max"] ?? NULL
             );
           }
           if (!empty($clause)) {
@@ -877,15 +877,15 @@ GROUP BY    currency
 
     // hack to fix title
     list($from1, $to1) = $this->getFromTo(CRM_Utils_Array::value("receive_date1_relative", $this->_params),
-      CRM_Utils_Array::value("receive_date1_from", $this->_params),
-      CRM_Utils_Array::value("receive_date1_to", $this->_params)
+      $this->_params["receive_date1_from"] ?? NULL,
+      $this->_params["receive_date1_to"] ?? NULL
     );
     $from1 = CRM_Utils_Date::customFormat($from1, NULL, ['d']);
     $to1 = CRM_Utils_Date::customFormat($to1, NULL, ['d']);
 
     list($from2, $to2) = $this->getFromTo(CRM_Utils_Array::value("receive_date2_relative", $this->_params),
-      CRM_Utils_Array::value("receive_date2_from", $this->_params),
-      CRM_Utils_Array::value("receive_date2_to", $this->_params)
+      $this->_params["receive_date2_from"] ?? NULL,
+      $this->_params["receive_date2_to"] ?? NULL
     );
     $from2 = CRM_Utils_Date::customFormat($from2, NULL, ['d']);
     $to2 = CRM_Utils_Date::customFormat($to2, NULL, ['d']);
@@ -914,13 +914,13 @@ GROUP BY    currency
    *   Rows generated by SQL, with an array for each row.
    */
   public function alterDisplay(&$rows) {
-    list($from1, $to1) = $this->getFromTo(CRM_Utils_Array::value("receive_date1_relative", $this->_params),
-      CRM_Utils_Array::value("receive_date1_from", $this->_params),
-      CRM_Utils_Array::value("receive_date1_to", $this->_params)
+    [$from1, $to1] = $this->getFromTo(CRM_Utils_Array::value("receive_date1_relative", $this->_params),
+      $this->_params["receive_date1_from"] ?? NULL,
+      $this->_params["receive_date1_to"] ?? NULL
     );
-    list($from2, $to2) = $this->getFromTo(CRM_Utils_Array::value("receive_date2_relative", $this->_params),
-      CRM_Utils_Array::value("receive_date2_from", $this->_params),
-      CRM_Utils_Array::value("receive_date2_to", $this->_params)
+    [$from2, $to2] = $this->getFromTo(CRM_Utils_Array::value("receive_date2_relative", $this->_params),
+      $this->_params["receive_date2_from"] ?? NULL,
+      $this->_params["receive_date2_to"] ?? NULL
     );
 
     $dateUrl = "";
index ed9a2080a1c3d93e1ca2e3aa9118cef6fe2b0a45..318e007cacc38821a3686293297e403b470576c3 100644 (file)
@@ -370,9 +370,9 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
               if (($fieldName == 'contribution_status_id' ||
                   $fieldName == 'financial_type_id') && !empty($clause)
@@ -526,13 +526,13 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
 
     foreach ($rows as $key => $row) {
       $display["upto_{$upto}"]
-        = CRM_Utils_Array::value("upto_{$upto}", $display) + CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
+        = ($display["upto_{$upto}"] ?? 0) + ($row["civicrm_upto_{$upto}"] ?? 0);
       $display[$previous_year]
-        = CRM_Utils_Array::value($previous_year, $display) + CRM_Utils_Array::value($previous_year, $row);
+        = ($display[$previous_year] ?? 0) + ($row[$previous_year] ?? 0);
       $display[$previous_two_year]
-        = CRM_Utils_Array::value($previous_two_year, $display) + CRM_Utils_Array::value($previous_two_year, $row);
+        = ($display[$previous_two_year] ?? 0) + ($row[$previous_two_year] ?? 0);
       $display[$previous_three_year]
-        = CRM_Utils_Array::value($previous_three_year, $display) + CRM_Utils_Array::value($previous_three_year, $row);
+        = ($display[$previous_three_year] ?? 0) + ($row[$previous_three_year] ?? 0);
     }
 
     $graphRows['value'] = $display;
index 0dcff4a211c291636d66cd1ed755a46879099d58..6d2f7beb754a2cd5661c4f6aef77421246b195db 100644 (file)
@@ -266,9 +266,9 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index e42e0036fa1cbacf144d79d7dd45ff8e57cba87f..d0865aa4eae13a6611efe84ada33317534add137 100644 (file)
@@ -218,9 +218,9 @@ class CRM_Report_Form_Event_IncomeCountSummary extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index ebe9d1a846446d65e049596d47d6bebcba85113c..67bd05b1adc98a9288ac3050625db793eb141514 100644 (file)
@@ -349,9 +349,9 @@ class CRM_Report_Form_Mailing_Bounce extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
 
index d2e4e61942a3366d63e572231aa87738a48411b5..7125920631a5ad9728175397c5c0db8cb2b77ebc 100644 (file)
@@ -436,9 +436,9 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form {
               else {
                 $clause = $this->whereClause($field,
                   $op,
-                  CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                  CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                  $this->_params["{$fieldName}_value"] ?? NULL,
+                  $this->_params["{$fieldName}_min"] ?? NULL,
+                  $this->_params["{$fieldName}_max"] ?? NULL
                 );
               }
             }
index 236c4cd30987d0b2f45cc5b246bad08d375f48e9..d2443dd7e3b6f0298a73922beb55df43cc789534 100644 (file)
@@ -232,9 +232,9 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form {
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index 4ba26fb9d8ef54b2ca77be637ca2f55e2a30b4c1..68fc16695cf57f866d5578c00bd42f0350278192 100644 (file)
@@ -197,9 +197,9 @@ LEFT  JOIN civicrm_contribution  {$this->_aliases['civicrm_contribution']}
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }
index 14b40773b37ac299d2e9255a2952dab446189a07..de15f85827c2b894517e2cb85d090b6edba12aa9 100644 (file)
@@ -130,9 +130,9 @@ FROM       civicrm_contact {$this->_aliases['civicrm_contact']} {$this->_aclFrom
             if ($op) {
               $clause = $this->whereClause($field,
                 $op,
-                CRM_Utils_Array::value("{$fieldName}_value", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_min", $this->_params),
-                CRM_Utils_Array::value("{$fieldName}_max", $this->_params)
+                $this->_params["{$fieldName}_value"] ?? NULL,
+                $this->_params["{$fieldName}_min"] ?? NULL,
+                $this->_params["{$fieldName}_max"] ?? NULL
               );
             }
           }