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 e61a1d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/Icingadb/Common/Macros.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit e61a1d3

Please sign in to comment.