[BUGFIX] Fix foreign_table_where GROUP BY handling
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FormDataProvider / AbstractItemProvider.php
index 5d45a12..1a96445 100644 (file)
@@ -943,6 +943,7 @@ abstract class AbstractItemProvider
         $foreignTableClauseArray = $this->processForeignTableClause($result, $foreignTableName, $localFieldName);
 
         $fieldList = BackendUtility::getCommonSelectFields($foreignTableName, $foreignTableName . '.');
+        /** @var QueryBuilder $queryBuilder */
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
             ->getQueryBuilderForTable($foreignTableName);
 
@@ -956,7 +957,7 @@ abstract class AbstractItemProvider
             ->where($foreignTableClauseArray['WHERE']);
 
         if (!empty($foreignTableClauseArray['GROUPBY'])) {
-            $queryBuilder->groupBy($foreignTableClauseArray['GROUPBY']);
+            $queryBuilder->groupBy(...$foreignTableClauseArray['GROUPBY']);
         }
 
         if (!empty($foreignTableClauseArray['ORDERBY'])) {