Issue Bug Closed

#17888Fatal error: Cannot use string offset as an array in .... class.t3lib_tcemain.php on line 2133

Peter 12/05/07, 14:05 updated 09/09/13, 08:43

Description

When using FlexForm for definition of input-fields, we got an error in the following case:
1.) Create an entry
2.) Delete this entry
3.) Trying to create a new entry will throw the following error:
Fatal error: Cannot use string offset as an array in /usr/Projekte/DAIMLER/server/DEV_T3_PORTAL/typo3_src/t3lib/class.t3lib_tcemain.php on line 2133

In function checkValue_flex_procInData_travDS (class.t3lib_tcemain.php on line) there ist a condition for calling $this->checkValue_flex_procInData_travDS in line: 2130 / 2131:
is_array($dataValues[$key][‘el’][$ik][$theKey][‘el’])

This condition is not enough. We have to add the following second condition:
if (is_array($dataValues_current) && is_array($dataValues_current[$key]) && is_array($dataValues_current[$key][‘el’][$ik]) && is_array($dataValues_current[$key][‘el’][$ik][$theKey]) ) {

The we have not errors anymore.

See screenshots.

Kind regards,
Peter

(issue imported from #M6892)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.