Skip to content

Commit

Permalink
avoid arrow function for php 7.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Nov 13, 2023
1 parent b10b466 commit 7ea2937
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion syntax.php
Expand Up @@ -143,7 +143,9 @@ public function getSortedItems($ns, $current, $useTitle, $useNatSort, $nsFirst,

// sort each level separately
foreach ($levels as $level => $items) {
uasort($items, fn($a, $b) => $this->itemComparator($a, $b, $useNatSort, $nsFirst));
uasort($items, function ($a, $b) use ($useNatSort, $nsFirst) {
return $this->itemComparator($a, $b, $useNatSort, $nsFirst);
});
$levels[$level] = $items;
}

Expand Down

0 comments on commit 7ea2937

Please sign in to comment.