Issue Bug Closed

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

Henrik Ziegenhain 01/19/23, 10:58 updated 02/08/23, 16:03

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;`

Reviews 1