Skip to content

Commit 18e43a8

Browse files
committed
#26986 Fix failing Unit Tests
1 parent 015c5fc commit 18e43a8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,13 @@ protected function _getSelectCountSql(?Select $select = null, $resetLeftJoins =
11941194
*/
11951195
private function removeEntityIdentifierFromGroupBy(Select $select): void
11961196
{
1197-
$groupBy = array_filter($select->getPart(Select::GROUP), function ($field) {
1197+
$originalGroupBy = $select->getPart(Select::GROUP);
1198+
1199+
if (!is_array($originalGroupBy)) {
1200+
return;
1201+
}
1202+
1203+
$groupBy = array_filter($originalGroupBy, function ($field) {
11981204
return false === strpos($field, $this->getIdFieldName());
11991205
});
12001206

0 commit comments

Comments
 (0)