Actions
Bug #96537
closedPHP Warning: Undefined array key "casesensitiveComp" in ... HTMLParser.php line 555 (PHP 8)
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2022-01-14
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
While updating a few systems to TYPO3 11 and PHP 8, I noticed this warning:
PHP Warning: Undefined array key "casesensitiveComp" in /var/www/html/htdocs/typo3/sysext/core/Classes/Html/HtmlParser.php line 555
We use the following typoscript snippet to filter out span tags with shy class:
// Remove any 'shy' classes from <span> elements:
lib.parseFunc_RTE.nonTypoTagStdWrap.HTMLparser.tags.span.fixAttrib.class.removeIfEquals = shy
// Remove all <span> elements which have no attribute:
lib.parseFunc_RTE.nonTypoTagStdWrap.HTMLparser.rmTagIfNoAttrib = span
To reproduce this warning, enable span tags in your rte editor, paste the typoscript snippet into you ts and create a text element with a <span class="shy">test</span>
I tried to trace it back and I think the problem lies in HtmlParser->HTMLparserConfig. When I add lib.parseFunc_RTE.nonTypoTagStdWrap.HTMLparser.tags.span.fixAttrib.casesensitiveComp = 0 to my typoscript, this methode removes it from the config.
Actions