From 434cc47b501da0b85bb64f53d250f08c0807a0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Wed, 25 Mar 2015 22:54:37 +0100 Subject: [PATCH] [BUGFIX] Don't assign empty content --- Classes/Traits/TagViewHelperTrait.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Traits/TagViewHelperTrait.php b/Classes/Traits/TagViewHelperTrait.php index 9efeeb060..40147bb93 100644 --- a/Classes/Traits/TagViewHelperTrait.php +++ b/Classes/Traits/TagViewHelperTrait.php @@ -75,7 +75,9 @@ protected function renderTag($tagName, $content = NULL, array $attributes = arra $this->tag->setTagName($tagName); $this->tag->addAttributes($attributes); $this->tag->forceClosingTag($forceClosingTag); - $this->tag->setContent($content); + if (NULL !== $content) { + $this->tag->setContent($content); + } // process some attributes differently - if empty, remove the property: foreach ($nonEmptyAttributes as $propertyName) { $value = $this->arguments[$propertyName];