Skip to content

Commit 630b352

Browse files
authored
ENGCOM-5787: Fix for bug: If multiple children had the same sort order only one of… #24457
2 parents 9d26432 + 0f768f5 commit 630b352

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Catalog/Block/Product/View/Details.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ public function getGroupSortedChildNames(string $groupName, string $callback): a
3737
$alias = $layout->getElementAlias($childName);
3838
$sortOrder = (int)$this->getChildData($alias, 'sort_order') ?? 0;
3939

40-
$childNamesSortOrder[$sortOrder] = $childName;
40+
$childNamesSortOrder[$childName] = $sortOrder;
4141
}
4242

43-
ksort($childNamesSortOrder, SORT_NUMERIC);
43+
asort($childNamesSortOrder, SORT_NUMERIC);
4444

45-
return $childNamesSortOrder;
45+
return array_keys($childNamesSortOrder);
4646
}
4747
}

0 commit comments

Comments
 (0)