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