mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
N°4985 - PHP 8.0: Fix usort callback return type in portal's lists initialization
This commit is contained in:
@@ -91,7 +91,10 @@ class Lists extends AbstractConfiguration
|
|||||||
}
|
}
|
||||||
// - Sorting list items by rank
|
// - Sorting list items by rank
|
||||||
usort($aListItems, function ($a, $b) {
|
usort($aListItems, function ($a, $b) {
|
||||||
return $a['rank'] > $b['rank'];
|
if ($a['rank'] == $b['rank']) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return $a['rank'] > $b['rank'] ? 1 : -1;
|
||||||
});
|
});
|
||||||
$aClassLists[$sListId] = $aListItems;
|
$aClassLists[$sListId] = $aListItems;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user