Project

General

Profile

Actions

Bug #95856

closed

Array to string conversion warning in IconFactory

Added by Robert Kärner about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2021-11-03
Due date:
% Done:

100%

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

Description

In the pages table, field module is configured in the TCA as 'type' => 'select' and renderType => 'selectSingle'.
The value is stored in the database as a simple string, i.e. $row['module'] = 'fe_users'.

When editing such a page record in the backend, TYPO3\Backend\Form\FormDataProvider\TcaSelectItems->addData() converts this string to an array like this: $row['module'] = [0 => 'fe_users'].

On PHP 8, this causes TYPO3\Core\Imaging\IconFactory->mapRecordTypeToIconIdentifier() to throw a
PHP Warning: Array to string conversion in typo3\sysext\core\Classes\Imaging\IconFactory.php line 190,
as it expects $row['module'] to be a plain string.

Actions

Also available in: Atom PDF