From b2538a07df4db9ea4e141e0cf869f9318cf33dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20E=C3=9Fl?= <indy.essl@gmail.com> Date: Wed, 22 Apr 2020 13:40:41 +0200 Subject: [PATCH] [BUGFIX] Check if $conf['tags.'] is array in ContentObjectRenderer If a html comment is placed in a fluid template at a position, that gets parsed by lib.parseFunc_RTE and no "tags" configuration exists for the parsefunc, a php warning is thrown, because it was not checked if $conf['tags.'] is an actual array. Resolves: #91172 Related: #39261 Releases: master Change-Id: Ia51ff78d7dcda6b74e9e4d218b5345f23c04333d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64304 Reviewed-by: Oliver Hader <oliver.hader@typo3.org> Reviewed-by: Josef Glatz <josefglatz@gmail.com> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Josef Glatz <josefglatz@gmail.com> Tested-by: Benni Mack <benni@typo3.org> --- .../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 cd1f8cf5961a..2aa654c7dab8 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php +++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php @@ -3930,7 +3930,7 @@ class ContentObjectRenderer implements LoggerAwareInterface } // Search for tags to process in current data and // call this method recursively if found - if (strpos($data, '<') !== false) { + if (strpos($data, '<') !== false && isset($conf['tags.']) && is_array($conf['tags.'])) { foreach ($conf['tags.'] as $tag => $tagConfig) { if (strpos($data, '<' . $tag) !== false) { $data = $this->_parseFunc($data, $conf); -- GitLab