Skip to content

Commit c824add

Browse files
Macros: Add missing support for bool type macro
1 parent 48fc880 commit c824add

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/Icingadb/Common/Macros.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ public function resolveMacro(string $macro, $object): string
123123

124124
if ($value instanceof DateTime) {
125125
$value = $value->getTimestamp();
126+
} elseif (is_bool($value)) {
127+
$value = $value ? 'y' : 'n';
126128
}
127129

128130
return $value ?? $macro;

0 commit comments

Comments
 (0)