From 30fa767c580be2d00417535be4f6c57b96807642 Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Tue, 10 Jan 2023 22:31:43 +0100
Subject: [PATCH] [BUGFIX] Avoid uninitialized string offset in
 ContentObjectRenderer

Resolves: #99073
Releases: main, 11.5
Change-Id: Ib4d69ebd3258451af19616810730ecd33c31077d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77328
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
---
 .../frontend/Classes/ContentObject/ContentObjectRenderer.php    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
index 930ad5de4fb7..1866b743c94f 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
@@ -3688,7 +3688,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                 $tag = explode(' ', trim($tagContent), 2);
                 $tag[0] = strtolower($tag[0]);
                 // end tag like </li>
-                if ($tag[0][0] === '/') {
+                if (str_starts_with($tag[0], '/')) {
                     $tag[0] = substr($tag[0], 1);
                     $tag['out'] = 1;
                 }
-- 
GitLab