Php 8.2 notice fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 23 Oct 2023 00:05:12 +0000 (13:05 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 23 Oct 2023 00:05:12 +0000 (13:05 +1300)
This uses the same variable name as other reports for selectClauses - which means
it is no longer undefined / causing test fails on edge

CRM/Report/Form/Contribute/SoftCredit.php

index 3def8e31888ed08f9ef95563cce7f4d5d7b8e543..566a6ef8738b7930f266726b390ab67634bee320 100644 (file)
@@ -376,7 +376,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form {
         }
       }
     }
-    $this->selectClause = $select;
+    $this->_selectClauses = $select;
 
     $this->_select = 'SELECT ' . implode(', ', $select) . ' ';
   }
@@ -457,7 +457,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form {
 
   public function groupBy() {
     $this->_rollup = 'WITH ROLLUP';
-    $this->_select = CRM_Contact_BAO_Query::appendAnyValueToSelect($this->selectClause, ["{$this->_aliases['civicrm_contribution_soft']}.contact_id", "constituentname.id"]);
+    $this->_select = CRM_Contact_BAO_Query::appendAnyValueToSelect($this->_selectClauses, ["{$this->_aliases['civicrm_contribution_soft']}.contact_id", "constituentname.id"]);
     $this->_groupBy = "
 GROUP BY {$this->_aliases['civicrm_contribution_soft']}.contact_id, constituentname.id {$this->_rollup}";
   }