Project

General

Profile

Actions

Bug #99637

closed

str_starts_with(): Argument #1 ($haystack) must be of type string, int given

Added by Henrik Ziegenhain over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
AdminPanel
Target version:
Start date:
2023-01-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Currently the Frontend crashes, when you have the AdminPanel enabled and try to insert an _INT Content-Object.

Steps to reproduce:
- enable admin panel
- print out current date uncached (*1)
- reload frontend

*1

TypoScript: 

lib.currentDate = COA_INT
lib.currentDate {
  10 = TEXT
  10.stdWrap.data = date:U
  10.stdWrap.strftime = %H:%M:%S
}

Fluid:
<f:cObject typoscriptObjectPath="lib.currentDate" />

Attached a Screenshot from where the exception comes.
"10" as key is not a valid yes in XLIFF-File und does not need to get translated at this point.

Solution:
Cast the assigned id (in this case an integer) to a string in `TranslateViewHelper` before line 147: `$id = (string)$id;`


Files

adminpanel-type-bug.png (15.8 KB) adminpanel-type-bug.png Henrik Ziegenhain, 2023-01-19 11:04
Actions #2

Updated by Gerrit Code Review over 1 year 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/+/77495

Actions #3

Updated by Gerrit Code Review over 1 year 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/+/77495

Actions #4

Updated by Henrik Ziegenhain over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF