From e61a1d3b516a92db6d5825106d7d9adb2057eef6 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 9 Jan 2025 12:24:35 +0100 Subject: [PATCH] Macros: Add missing support for `bool` type macro --- library/Icingadb/Common/Macros.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Icingadb/Common/Macros.php b/library/Icingadb/Common/Macros.php index 0ace2a9e1..78afc0129 100644 --- a/library/Icingadb/Common/Macros.php +++ b/library/Icingadb/Common/Macros.php @@ -125,6 +125,10 @@ public function resolveMacro(string $macro, $object): string $value = $value->getTimestamp(); } + if (is_bool($value)) { + $value = $value ? 'y' : 'n'; + } + return $value ?? $macro; } }