Skip to content
Snippets Groups Projects
Commit 2b2c8a75 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Require array in setFlatConstants()

Constant substitution in TS parser is implemented in
ConstantAwareTokenStream. It kicks in by casting the
stream to string after existing constants have been
set using ConstantAwareTokenStream->setFlatConstants().

To not have a "polluted" stream after setFlatConstants(),
the constants are reset using setFlatConstants(null)
after use. Ugly. Patch #102742 established a partial
solution already by cloning the stream instead.

Finish the clone approach to disallow setFlatConstants(null).
Add two missing void return annotations at related places
along the way.

Resolves: #103982
Related: #97816
Related: #102742
Releases: main, 12.4
Change-Id: I964bb40dfa1e29b23f876ba85ad05ba2a94ca6d6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84506


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 011e4563
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment