Actions
Bug #93513
closedBug: TypoScript: TypeError if .postUserFunc= without .postUserFunc.xxx=
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2021-02-15
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Problem¶
Code¶
# good, works lib.helloworld_1 = TEXT lib.helloworld_1 { value = Hello world! } # bad, FAILS lib.helloworld_2 = TEXT lib.helloworld_2 { value = Hello world! postUserFunc = ArtbeitDesign\Sitepackage\Utility\HttpCookie->csvAddRegionCookie } # good, works lib.helloworld_3 = TEXT lib.helloworld_3 { value = Hello world! postUserFunc = ArtbeitDesign\Sitepackage\Utility\HttpCookie->csvAddRegionCookie postUserFunc { } }
Files
Updated by Georg Ringer about 4 years ago
- Status changed from Accepted to Needs Feedback
what about just doing
public function fo(string $content, array $conf = null) { }
and it will work just fine
Updated by Martin Bless about 4 years ago
Georg Ringer wrote in #note-2:
what about just doing
[allow null]
and it will work just fine
I mainly wanted to point out a problem that you can run into if you follow the documentation.
The question is:
- Is allowing for null best practice? Then we should update documentation.
- Should null not be expected? Then the callers should be fixed.
How to decide?
Updated by Gerrit Code Review about 4 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68168
Updated by Gerrit Code Review about 4 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68127
Updated by Georg Ringer about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f74189d0480b31176bc89b3c0479bc895e781a16.
Updated by Georg Ringer about 4 years ago
- Related to Bug #93758: postUserFunc type issues added
Actions