Issue Bug Rejected

#98096Missing null check

JAKOTA Design Group GmbH 08/06/22, 11:01 updated 01/12/23, 15:14

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.