TemplateTree: make sure we are ready, even when...

...our very first object is unstored
This commit is contained in:
Thomas Gelf 2017-08-21 20:58:58 +02:00
parent 6ba0e8e924
commit f00473777e
1 changed files with 1 additions and 0 deletions

View File

@ -141,6 +141,7 @@ class TemplateTree
protected function getAncestorsForUnstoredObject(IcingaObject $object)
{
$this->requireTree();
$names = $object->imports()->listImportNames();
$ancestors = [];
foreach ($names as $name) {