Bug #64914
closed
Cleaner scripts crashes due to incomplete flexform content
Added by Jose Antonio Guerra almost 10 years ago.
Updated about 6 years ago.
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.
- Sprint Focus set to Stabilization Sprint
- 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
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
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
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
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
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
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
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
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")
- Status changed from Resolved to Closed
Also available in: Atom
PDF