From 82c988baaa48d9768aa71ff5a7b9e74c3b4c0b9a Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 3 Jun 2024 15:08:30 +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');