Skip to content

Commit 39202ba

Browse files
Added check for equality to return 0 This now covers all possible situations, returning a value that the usort function expects
1 parent 72ca610 commit 39202ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/code/Magento/Customer/Block/Account/Navigation.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public function getLinks()
4646
*/
4747
private function compare(SortLinkInterface $firstLink, SortLinkInterface $secondLink)
4848
{
49+
if ($firstLink->getSortOrder() == $secondLink->getSortOrder()) {
50+
return 0;
51+
}
52+
4953
return ($firstLink->getSortOrder() < $secondLink->getSortOrder()) ? -1 : 1;
5054
}
5155
}

0 commit comments

Comments
 (0)