Project

General

Profile

Actions

Bug #69226

closed

PHP Warnings in FormEngine.php

Added by Felix H over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-08-21
Due date:
% Done:

0%

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

Description

Hey,

on viewing the "Frontend users and groups" I get:

PHP Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /html/typo3/sysext/backend/Classes/Form/FormEngine.php line 1548

this can be solved by modifying the given line to:

if (is_array($PA['fieldChangeFunc']))
    $PA['fieldChangeFunc'] = array_merge(array('typo3form.fieldGet' => 'typo3form.fieldGet(' . $paramsList . ');'), $PA['fieldChangeFunc']);
else
    $PA['fieldChangeFunc'] = array('typo3form.fieldGet' => 'typo3form.fieldGet(' . $paramsList . ');');

in current 6.2 repo it is https://forge.typo3.org/projects/typo3cms-core/repository/entry/typo3/sysext/backend/Classes/Form/FormEngine.php?rev=TYPO3_6-2#L1539

and I get

PHP Warning: implode() [function.implode]: Invalid arguments passed in /html/typo3/sysext/backend/Classes/Form/FormEngine.php line 2186

this can be solved by

$sOnChange = 'if (this.options[this.selectedIndex].value==\'--div--\') {this.selectedIndex=' . $sI . ';} ' . ($PA['fieldChangeFunc']?implode('', $PA['fieldChangeFunc']):'');

https://forge.typo3.org/projects/typo3cms-core/repository/entry/typo3/sysext/backend/Classes/Form/FormEngine.php?rev=TYPO3_6-2#L2174

regards fhe

Actions

Also available in: Atom PDF