Skip to content

Commit

Permalink
Action: Don't attempt to resolve macros without an object
Browse files Browse the repository at this point in the history
fixes #999
  • Loading branch information
nilmerg committed Mar 22, 2024
1 parent 305a731 commit 20d9f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icingadb/Web/Navigation/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 20d9f8b

Please sign in to comment.