From c4101e184caef3a867551924a48fe158dfccdafe Mon Sep 17 00:00:00 2001 From: Thomas Hohn <thomas@hohn.dk> Date: Thu, 9 Feb 2023 13:19:29 +0100 Subject: [PATCH] [BUGFIX] Fix PHP 8 warning in ContentObjectRenderer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handle faulty HTML tags that can cause a PHP warning. This is done by adding a isset() guard. Resolves: #99896 Releases: main, 11.5 Change-Id: I69c03fa55d7ad3d3f355bf76c43b3fff6e0a1f85 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77812 Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> 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 1b7caca162fb..6d4be137f7b2 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php +++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php @@ -3713,7 +3713,7 @@ class ContentObjectRenderer implements LoggerAwareInterface } } // out-tag - if ($currentTag[0] === $tag[0] && isset($tag['out']) && $tag['out']) { + if (isset($currentTag[0], $tag['out']) && $currentTag[0] === $tag[0] && $tag['out']) { $theName = $conf['tags.'][$tag[0]]; $theConf = $conf['tags.'][$tag[0] . '.']; // This flag indicates, that NL- (13-10-chars) should be stripped first and last. -- GitLab