Project

General

Profile

Actions

Bug #103472

closed

PHP Warning: Undefined array key "items" in DataHandler.php line 2351

Added by Nikita Hovratov about 2 months ago. Updated 16 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-03-23
Due date:
% Done:

100%

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

Description

This is an edge case, which happens with the constellation below:

Content Element A has a field of type "radio".
This field has not "items" set directly, but through "columnsOverrides" for this specific type "A".

Unrelated Content Element B is translated from default language to another language.
Translation spinner spins endlessly. In the background the PHP warning was triggered.

The reason is the DataHandler context for the translation is Content Element B. So the "record type" B is used to retrieve "columnsOverrides" for "types". Thus resulting in empty "items" for type "radio". DataHandler method "checkValueForRadio" does not have a safety net for missing "items".

A fix could be to set "items" to an empty array if not defined or not an array. This would also ensure an array is passed to "$processingService->getProcessingItems" some lines below.

Actions

Also available in: Atom PDF