Bug #85055

Illegal string offset error when editing content with specific pi_flexform value (PHP 7)

Added by Jonathan Daigle over 1 year ago.

Could have
FormEngine aka TCEforms
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


With PHP 7, editing a tt_content with pi_flexform having the following value will throw an uncaught Typo3 error if the flexform has to be extended during processing :

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
        <sheet index="sDEF">
            <language index="lDEF"></language>

This value causes an error to be thrown at line 559 of sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php as $result['databaseRow'][$fieldName]['data'][$dataStructureSheetName]['lDEF'] is then set to an empty string, which isn't automatically converted to an empty array with PHP 7. Casting it to an array solves the issue.

I have not been able to test it, but I am fairly sure this problem will also happen in Typo3 7.6 with PHP 7. With PHP 5.5 (and Typo3 7.6.21), editing these contents works without any problem.

Steps to reproduce :

1. Have a tt_content with the problematic value in pi_flexform. This is probably the hardest part, as I haven't been able to generate it apart from leftover
pi_flexform in several content elements after migrating from TemplaVoilà to Grid Elements during our migration to Typo3 7.6.
2. Edit said tt_content. If the tt_content does not already extend the stored flexform value and generate the error, changing the type to a tt_content that has flexform will cause the issue.

Also available in: Atom PDF