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:
parent
6289bf065f
commit
90b5f6fdac
|
@ -232,6 +232,7 @@ class IcingaObjectImports implements Iterator, Countable, IcingaConfigRenderer
|
|||
{
|
||||
$list = [];
|
||||
foreach ($this->listImportNames() as $name) {
|
||||
$name = (string) $name;
|
||||
$list[$name] = $this->getObject($name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue