Skip to content

Commit 1a33f56

Browse files
committed
Merge remote-tracking branch 'origin/ac1955new' into Hammer_Quality_Backlog_GraphQl_13042022
2 parents b44eee9 + 4afe14c commit 1a33f56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogGraphQl/DataProvider/Product/SearchCriteriaBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private function addEntityIdSort(SearchCriteriaInterface $searchCriteria): void
159159
{
160160
$sortOrderArray = $searchCriteria->getSortOrders();
161161
$sortDir = SortOrder::SORT_DESC;
162-
if (count($sortOrderArray) > 0) {
162+
if (is_array($sortOrderArray) && count($sortOrderArray) > 0) {
163163
$sortOrder = end($sortOrderArray);
164164
// in the case the last sort order is by position, sort IDs in descendent order
165165
$sortDir = $sortOrder->getField() === EavAttributeInterface::POSITION

0 commit comments

Comments
 (0)