Actions
Bug #98096
closedMissing null check
Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2022-08-06
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
Hi,
The function getTypoScriptFrontendController() in typo3/sysext/core/Classes/TypoScript/TemplateService.php returns TypoScriptFrontendController or null.
But null is not always checked before use.
Like in the same file line 407
if ($this->getTypoScriptFrontendController()->all) {
should be like
if ($this->getTypoScriptFrontendController()?->all) {
or depending on the coding style..
if ($this->getTypoScriptFrontendController()?->all ?? false) {
And this is not the only case.
Actions