From 20d9f8b71237be880875db29f9cbc414a4930102 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 22 Mar 2024 13:47:21 +0100 Subject: [PATCH] Action: Don't attempt to resolve macros without an object fixes #999 --- library/Icingadb/Web/Navigation/Action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icingadb/Web/Navigation/Action.php b/library/Icingadb/Web/Navigation/Action.php index d02f933af..449e9d207 100644 --- a/library/Icingadb/Web/Navigation/Action.php +++ b/library/Icingadb/Web/Navigation/Action.php @@ -113,7 +113,7 @@ public function setUrl($url): self public function getUrl(): ?\Icinga\Web\Url { $url = parent::getUrl(); - if (! $this->resolved && $url === null && $this->rawUrl !== null) { + if (! $this->resolved && $url === null && $this->rawUrl !== null && $this->object !== null) { $this->setUrl(Url::fromPath($this->expandMacros($this->rawUrl, $this->getObject()))); $this->resolved = true; return parent::getUrl();