Project

General

Profile

Actions

Bug #91141

closed

Exception in Template module with parsing constant comments

Added by Riny van Tiggelen about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-04-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you have defaultTypoScript_constants defined in the LocalConfiguration, it's possible that the Template backend module throws an exception while trying to parse the constant comments:

trim() expects parameter 1 to be string, null given

in /var/www/html/public/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php line 296

I'm not exactly sure where this went wrong, since the parsing of these constants have changed quite a bit in CMS10.

The only thing I see is that the isset() check has been removed, in CMS9:
https://github.com/TYPO3/TYPO3.CMS/blob/v9.5.15/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php#L992-L994
in CMS10:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php#L298

Not sure if it has something to do with the defaultTypoScript_constants or that it's just the check that goes wrong (and it's enough to restore the isset check).

Actions

Also available in: Atom PDF