diff --git a/core/sqlobjectquery.class.inc.php b/core/sqlobjectquery.class.inc.php index eb261f644..283551d35 100644 --- a/core/sqlobjectquery.class.inc.php +++ b/core/sqlobjectquery.class.inc.php @@ -388,7 +388,8 @@ class SQLObjectQuery extends SQLQuery { if (count($this->__aSelectedIdFields) > 0) { - $aCountFields = array(); + $aCountFields = []; + $aCountI = []; $i = 0; foreach ($this->__aSelectedIdFields as $sFieldExpr) { $aCountFields[] = "COALESCE($sFieldExpr, 0) AS idCount$i"; // Null values are excluded from the count