Skip to content

Commit

Permalink
Macros: Add missing support for bool type macro
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jan 9, 2025
1 parent 48fc880 commit c824add
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/Icingadb/Common/Macros.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c824add

Please sign in to comment.