Project

General

Profile

Actions

Bug #64914

closed

Cleaner scripts crashes due to incomplete flexform content

Added by Jose Antonio Guerra about 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2015-02-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

When the DS have more fields described than the actual FlexForm content the check crashes:

PHP error: Illegal string offset
Where: typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php, around line 230

The method \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::traverseFlexFormXMLData_recurse fails to check parameters before calling itself recursively therefore crashing the script.

This bug is related to #17237 and #18472 but in this case there's no malformed XML triggering the failure.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #17237: Fatal error: Cannot use string offset as an array in C:\xampp\htdocs\dev\TYPO\dummy\t3lib\class.t3lib_flexformtools.php on lineClosedFrancois Suter2007-04-24

Actions
Related to TYPO3 Core - Bug #18472: Cleaner scripts crash with errors due to malformed flexform contentClosedChristian Kuhn2008-03-18

Actions
Related to TYPO3 Core - Bug #68160: Warning in FlexFormTools.php since typo 6.2.10Closed2015-07-15

Actions
Actions #1

Updated by Christian Kuhn about 9 years ago

  • Sprint Focus set to Stabilization Sprint
Actions #2

Updated by Gerrit Code Review about 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36720

Actions #3

Updated by Gerrit Code Review about 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36720

Actions #4

Updated by Gerrit Code Review about 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36720

Actions #5

Updated by Gerrit Code Review about 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36720

Actions #6

Updated by Gerrit Code Review about 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36722

Actions #7

Updated by Gerrit Code Review about 9 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36722

Actions #8

Updated by Jose Antonio Guerra about 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Jo Hasenau about 9 years ago

According to a clients information the import of the l10nmgr is broken with 6.2.10 and I tracked it down to this change

The problem is the new behavour in line 225 of FlexFormTools.php
The old version handed over $this as reference, the new one puts it into an array.

Results in

PHP Warning: 
Parameter 5 to tx_l10nmgr_tools::translationDetails_flexFormCallBackForOverlay()
expected to be a reference, value given in 
/domains/typo3_src/typo3_src-6.2.10/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php line 242

Actions #10

Updated by Jose Antonio Guerra about 9 years ago

Jo Hasenau wrote:

According to a clients information the import of the l10nmgr is broken with 6.2.10 and I tracked it down to this change

The problem is the new behavour in line 225 of FlexFormTools.php
The old version handed over $this as reference, the new one puts it into an array.

Results in
[...]

Which PHP version are you using? Seems not being consistent through recent versions...

The problem seems to be that "call_user_func_array" does not honor the destination function signature so parameters are always passed by value. The extra function was introduced to be able to add unit testing to the patch but this is indeed a nasty side effect.

(see http://php.net/manual/en/function.call-user-func-array.php#refsect1-function.call-user-func-array-notes)

In the meanwhile you may replace the calls to "$this->executeCallBackMethod" with the former method or changing the receiving function so it expects its 5th parameter to be passed by value (changing "&$param" to "$param")

Actions #11

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF