diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
index 16fb86fdd44b42dd47db25c2b3fd33426eb5851e..0128fc4ef2137b33db40efa1cfbe85666c8da7a1 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
@@ -3823,7 +3823,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
 
         $str_content = '';
         foreach ($lParts as $k => $l) {
-            $sameBeginEnd = 0;
+            $sameBeginEnd = false;
             $emptyTag = false;
             $l = trim($l);
             $attrib = [];
@@ -3837,7 +3837,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                         $tagName = substr($tagName, 0, -1);
                     }
                     if (substr($fwParts[0], -1) === '/') {
-                        $sameBeginEnd = 1;
+                        $sameBeginEnd = true;
                         $emptyTag = true;
                         // decode HTML entities, they're encoded later again
                         $attrib = GeneralUtility::get_tag_attributes('<' . substr($fwParts[0], 0, -1) . '>', true);