diff --git a/Classes/ViewHelpers/Format/ReplaceViewHelper.php b/Classes/ViewHelpers/Format/ReplaceViewHelper.php index e1a3c8485..483d17d6e 100644 --- a/Classes/ViewHelpers/Format/ReplaceViewHelper.php +++ b/Classes/ViewHelpers/Format/ReplaceViewHelper.php @@ -41,7 +41,7 @@ public static function renderStatic( \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ) { - $content = $renderChildrenClosure(); + $content = (string) $renderChildrenClosure(); /** @var string $substring */ $substring = (string) $arguments['substring']; /** @var string $replacement */