We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b44eee9 + 4afe14c commit 1a33f56Copy full SHA for 1a33f56
app/code/Magento/CatalogGraphQl/DataProvider/Product/SearchCriteriaBuilder.php
@@ -159,7 +159,7 @@ private function addEntityIdSort(SearchCriteriaInterface $searchCriteria): void
159
{
160
$sortOrderArray = $searchCriteria->getSortOrders();
161
$sortDir = SortOrder::SORT_DESC;
162
- if (count($sortOrderArray) > 0) {
+ if (is_array($sortOrderArray) && count($sortOrderArray) > 0) {
163
$sortOrder = end($sortOrderArray);
164
// in the case the last sort order is by position, sort IDs in descendent order
165
$sortDir = $sortOrder->getField() === EavAttributeInterface::POSITION
0 commit comments