Project

General

Profile

Actions

Bug #99200

open

"Illegal offset type in isset or empty" on PHP8.1 when saving type "select", renderType = "selectCheckbox".

Added by Sascha Löffler over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2022-11-25
Due date:
% Done:

0%

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

Description

PHP 8.1 throws an exception on saving a new entry with includes a field of type "select" and renderType = "selectCheckbox". (didn't test other renderTypes)

Exception is `Illegal offset type in isset or empty` in file web/typo3/sysext/backend/Classes/Utility/BackendUtility.php on Line 681.

It appears that $typeNum contains the array of the selected items if the element is new. If it is edited and saved, it includes a string with the values comma separated.

An array is apparaently not allowed in this isset() condition.

I am not sure why there is this difference if the element is new or edited. But it is already in this format when it arrives in the ServerRequest and as far as i have seen, it is never converted into a comma separated string in the dataHandler.

first checking if it is an array does fix the issue and the entry is correctly created in the database.


Files

No data to display

Actions

Also available in: Atom PDF