Project

General

Profile

Actions

Bug #98096

closed

Missing null check

Added by JAKOTA Design Group GmbH over 2 years ago. Updated almost 2 years ago.

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Actions

Also available in: Atom PDF