Bug #93758
closedpostUserFunc type issues
0%
Description
https://forge.typo3.org/issues/93513
This patch changed the second argument to empty array instead of null.
In our case we don't have a customized function that resolves something but use `base64_decode()`
This now causes the following error:
PHP Warning: base64_decode() expects parameter 2 to be bool, array given in
The setup to recreate the issue pretty simple
page { cssInline { 1 = TEXT // this is: body { background: blue; } -- base64 encoded 1.value = CmJvZHkgewogICBiYWNrZ3JvdW5kOiBibHVlOwp9Cg== 1.value.postUserFunc = base64_decode } }
My recommendation would be to revert the change and update the docs like documented in the issue
Updated by Georg Ringer over 3 years ago
- Related to Bug #93513: Bug: TypoScript: TypeError if .postUserFunc= without .postUserFunc.xxx= added
Updated by Riccardo De Contardi over 3 years ago
- Category set to Content Rendering
Updated by Benni Mack about 3 years ago
- Status changed from New to Needs Feedback
If we write tests for this in TYPO3 v11 in order to fix this, this breaks PHP8 compatibility. I don't think this is a good solution to use native PHP functions...
Updated by Christian Kuhn almost 3 years ago
- Status changed from Needs Feedback to Rejected
Hey. I hope it is ok to set this issue to rejected for now: I agree with benni that it's probably not a good idea when core allows exposing arbitrary php methods at this point. In case you need additional help or discussion on this, feel free to re-open or create a fresh issue, or ping us.