From 785648bb64330a27b8b928e853acdd61b40b5d01 Mon Sep 17 00:00:00 2001 From: Christian Schramm Date: Thu, 19 Oct 2023 12:49:08 +0200 Subject: [PATCH] Fix db type error, when hostgroup is accidentially interpreted as integer fixes #2821 --- library/Director/Objects/IcingaObjectGroups.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Director/Objects/IcingaObjectGroups.php b/library/Director/Objects/IcingaObjectGroups.php index 8bef1b195..770254e9a 100644 --- a/library/Director/Objects/IcingaObjectGroups.php +++ b/library/Director/Objects/IcingaObjectGroups.php @@ -183,6 +183,10 @@ public function add($group, $onError = 'fail') return $this; } + if (is_int($group)) { + $group = "$group"; + } + /** @var IcingaObjectGroup $class */ $class = $this->getGroupClass();