Project

General

Profile

Actions

Bug #93758

closed

postUserFunc type issues

Added by Henrik Elsner about 3 years ago. Updated about 2 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2021-03-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #93513: Bug: TypoScript: TypeError if .postUserFunc= without .postUserFunc.xxx= Closed2021-02-15

Actions
Actions #1

Updated by Georg Ringer about 3 years ago

  • Related to Bug #93513: Bug: TypoScript: TypeError if .postUserFunc= without .postUserFunc.xxx= added
Actions #2

Updated by Riccardo De Contardi about 3 years ago

  • Category set to Content Rendering
Actions #3

Updated by Benni Mack over 2 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...

Actions #4

Updated by Christian Kuhn about 2 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.

Actions

Also available in: Atom PDF