From 6f26907181d386421f3d2cdc2b7531250001a28c Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 3 Jun 2024 19:48:39 +0200 Subject: [PATCH] Adjust handling of boolean values in metrics output Ensure boolean values are converted to integers for consistency. --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index c9d6d7e..42d4dfc 100644 --- a/index.php +++ b/index.php @@ -48,6 +48,8 @@ if($_SERVER["REQUEST_URI"] == '/metrics' || php_sapi_name() == 'cli') { } else { $c['value'] = $output; } + + if(is_bool($c['value'])) $c['value'] = $c['value'] ? 1 : 0; } $loader = new \Twig\Loader\FilesystemLoader('templates');