mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-06-10 08:05:49 +02:00
fix: sort logic (#780)
This commit is contained in:
parent
8e0abc30b9
commit
828db761ac
@ -1257,8 +1257,8 @@ class JavascriptRenderer
|
||||
$controls = array_merge($widgets, $this->controls);
|
||||
|
||||
// Allow widgets to be sorted by order if specified
|
||||
uasort($controls, function(array $control){
|
||||
return $control['order'] ?? 0;
|
||||
uasort($controls, function(array $controlA, array $controlB){
|
||||
return ($controlA['order'] ?? 0) <=> ($controlB['order'] ?? 0);
|
||||
});
|
||||
|
||||
foreach (array_filter($controls) as $name => $options) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user