#99200"Illegal offset type in isset or empty" on PHP8.1 when saving type "select", renderType = "selectCheckbox".
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.
Reviews 3
Files 1
History 27
-
Gerrit Code Review pushed patch set 1 for main to change 87419 status
NewUnder Review <span data-processor="relativetime" data-value="2024-12-10T14:39:51+00:00" > 12/10/24, 14:39 </span> -
Gerrit Code Review pushed patch set 2 for main to change 87419 <span data-processor="relativetime" data-value="2024-12-16T13:19:43+00:00" > 12/16/24, 13:19 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 87419 <span data-processor="relativetime" data-value="2024-12-16T13:20:49+00:00" > 12/16/24, 13:20 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 87530 <span data-processor="relativetime" data-value="2024-12-17T13:18:35+00:00" > 12/17/24, 13:18 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 87531 <span data-processor="relativetime" data-value="2024-12-17T13:18:45+00:00" > 12/17/24, 13:18 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-12-17T13:35:09+00:00" > 12/17/24, 13:35 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:33:57+00:00" > 12/02/25, 14:33 </span>
Applied in changeset commit:ac24ba415e7e4fb543d6bd30675ee826c66fe94d.