diff --git a/Classes/ViewHelpers/Script/WriteViewHelper.php b/Classes/ViewHelpers/Script/WriteViewHelper.php index f5392c2..f42a7db 100644 --- a/Classes/ViewHelpers/Script/WriteViewHelper.php +++ b/Classes/ViewHelpers/Script/WriteViewHelper.php @@ -101,7 +101,7 @@ public function render(): string return ''; } - $condition = trim($this->arguments['condition']); + $condition = isset($this->arguments['condition']) ? trim($this->arguments['condition']) : ''; $condition = strlen($condition) ? "if($condition)" : ''; $this->tag->setContent($condition . 'document.write(\'' . addcslashes($html, "'") . '\')');