From c824addbd75353eeb0eaef37799f541fdf95da7c 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/Icingadb/Common/Macros.php b/library/Icingadb/Common/Macros.php index 0ace2a9e1..c23420e52 100644 --- a/library/Icingadb/Common/Macros.php +++ b/library/Icingadb/Common/Macros.php @@ -123,6 +123,8 @@ public function resolveMacro(string $macro, $object): string if ($value instanceof DateTime) { $value = $value->getTimestamp(); + } elseif (is_bool($value)) { + $value = $value ? 'y' : 'n'; } return $value ?? $macro;