1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-06 17:45:50 +02:00

fix: sort logic ()

This commit is contained in:
snmatsui
2025-05-12 17:34:13 +09:00
committed by GitHub
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) {