From bf917cd6519e65c8103c9354fd1b8f2c41097cf4 Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Fri, 14 Apr 2023 11:55:35 +0100 Subject: [PATCH] Display items on Jump Config debugger panel in alpha order --- jumpapp/classes/Debugger/JumpConfigPanel.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jumpapp/classes/Debugger/JumpConfigPanel.php b/jumpapp/classes/Debugger/JumpConfigPanel.php index baad989..727c9a7 100644 --- a/jumpapp/classes/Debugger/JumpConfigPanel.php +++ b/jumpapp/classes/Debugger/JumpConfigPanel.php @@ -16,11 +16,16 @@ namespace Jump\Debugger; class JumpConfigPanel { public static function panel(?\Throwable $e) { if ($e === null) { + // Get all config params as an array and sort them by param name. + $configparams = (new \Jump\Config())->get_all(); + ksort($configparams); + // Prepare the panel HTML, listing the config param key and value. $content = '
';
-			foreach ((new \Jump\Config())->get_all() as $param => $value) {
+			foreach ($configparams as $param => $value) {
 				$content .= ''.$param.' : '.$value.'
'; } $content .= '
'; + // Return the panel items. return [ 'tab' => 'Jump Config', 'panel' => $content,