Issue Bug Closed

#92761 TypeError in Wizard TableController if db contains null

Daniel Siepmann 11/03/20, 15:33 updated 12/22/20, 11:03

Description

A TypeError might occur when using the TableController as wizard for an input field in TCA.
Given the following configuration for TCA field:

        'example_field' => [
            'exclude' => true,
            'label' => 'example field for table wizard',
            'config' => [
                'default' => '',
                'type' => 'text',
                'renderType' => 'textTable',
                'cols' => 80,
                'rows' => 15,
                'wrap' => 'off',
            ],
        ],

And the following ext_tables.sql:

example_field mediumtext,

That will result in:

(1/1) TypeError

Argument 1 passed to TYPO3\CMS\Backend\Controller\Wizard\TableController::configurationStringToArray() must be of the type string, null given, called in /typo3/sysext/backend/Classes/Controller/Wizard/TableController.php on line 316

As the called method requires a string, but null is passed from db query result.

The code is the same for 9, 10 and master, the issue should exist in all three versions. We’ve encountered the issue in v10 LTS.

Reviews 3