Skip to content

Commit

Permalink
[BUGFIX] Enforce ArchiveViewHelper to return a string
Browse files Browse the repository at this point in the history
If the configuration `plugin.tx_blog.settings.archiveUid` is undefined,
the link to the archive pages cannot be built which causes the
"generation" of the link text only. However, this may fail if only the
year is returned, as it is an integer.

This patch adds a string cast to the rendering result to handle
year-only results as strings as well.
  • Loading branch information
andreaskienast committed Jan 7, 2021
1 parent 61db6df commit d6f8c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Link/ArchiveViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function render(): string
$result = $this->renderChildren();
}

return $result;
return (string)$result;
}

/**
Expand Down

0 comments on commit d6f8c74

Please sign in to comment.