Project

General

Profile

Actions

Bug #99906

closed

Constant Editor emits "Call to a member function getType() on null" Exception if TypoScript constant uses "copy operator <"

Added by Stefan Bürk almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2023-02-09
Due date:
% Done:

100%

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

Description

Backend badly crashes with an exception, if `TypoScript -> Constant Editor` is called,
and the TypoScript constants code contains references to prip defined constants with
constant-editor configuration comments.

# cat=custom/a; type=color; label=Primary Color
plugin.tx_example.primaryColor = #282E31

# cat=custom/a; type=color; label=Other Color
plugin.tx_example.otherColor < plugin.tx_example.primaryColor

First thought has been, that it's erlated to the
hash of the color value, but it's not.

# cat=custom/a; type=input; label=Primary Color
plugin.tx_example.primaryColor = some-text

# cat=custom/a; type=input; label=Other Color
plugin.tx_example.otherColor < plugin.tx_example.primaryColor

Following exception is thrown:

If

$firstTokenType = $trimmedTokenStream->peekNext()->getType();

is replaced with

$firstTokenType = $trimmedTokenStream->peekNext()?->getType();

It would work. However, the question is, beside having that guard here,
if the issue is related basically in another place first.


Files

Auswahl_1198.png (59.1 KB) Auswahl_1198.png Stefan Bürk, 2023-02-09 17:38

Related issues 1 (0 open1 closed)

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

Actions
Actions

Also available in: Atom PDF