Bug #99906
closedConstant Editor emits "Call to a member function getType() on null" Exception if TypoScript constant uses "copy operator <"
100%
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
Updated by Stefan Bürk almost 2 years 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 <"
Updated by Stefan Bürk almost 2 years ago
- Related to Feature #97816: New TypoScript parser added
Updated by Gerrit Code Review almost 2 years 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
Updated by Gerrit Code Review almost 2 years 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
Updated by Stefan Bürk almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 32dc37fe7d61990fb74cc3d559089576439e4c7f.