Skip to content

Commit

Permalink
[Bugfix] pruefe auf not null bevor trim() aufgerufen wird. (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie Brunner <[email protected]>
  • Loading branch information
sophiebrunner and Sophie Brunner authored Oct 2, 2024
1 parent e7591f5 commit 9350acd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Script/WriteViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, "'") . '\')');
Expand Down

0 comments on commit 9350acd

Please sign in to comment.