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 about 1 year ago. Updated about 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 #1

Updated by Stefan Bürk about 1 year ago

  • Subject changed from Constant Editor emits "Call to a member function getType() on null" Exception if TypoScript constant with reference is used to Constant Editor emits "Call to a member function getType() on null" Exception if TypoScript constant uses "copy operator <"
Actions #2

Updated by Stefan Bürk about 1 year ago

Actions #3

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77808

Actions #4

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77808

Actions #5

Updated by Stefan Bürk about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF