Convert $imports keys to string explicitly

The keys of $imports in IcingaObjectImports must be converted to string explicitly or else it establishes incorrect parent-child relation
in icinga_host_inheritance table in case the key is integer value and there is an host object with id = key(integer) icinga_host table.
This results in undefined offset while triggering sync rule.
This commit is contained in:
Ravi Kumar Kempapura Srinivasa 2021-09-30 15:25:45 +02:00 committed by Thomas Gelf
parent 6289bf065f
commit 90b5f6fdac
1 changed files with 1 additions and 0 deletions

View File

@ -232,6 +232,7 @@ class IcingaObjectImports implements Iterator, Countable, IcingaConfigRenderer
{
$list = [];
foreach ($this->listImportNames() as $name) {
$name = (string) $name;
$list[$name] = $this->getObject($name);
}