Project

General

Profile

Actions

Bug #23245

closed

Argument 3 passed to t3lib_frontendedit::displayEditIcons() must be an array, null given

Added by Daniel Mueller over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2010-07-21
Due date:
% Done:

0%

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

Description

I have cleared display of displayEditIcons, so the icons don't show up, even when frontend editing is active. It appears, that typoscript sets the configuration of rendering the element to null. Php throws an error, because the rendering gets delegated to another function which excepts only an array as third parameter.

I am not sure how I made Typoscript set the value to null, but this can be fixed with the following workaround:

/*around line 7911 in class.tslib_content.php:
change
$GLOBALS['BE_USER']->frontendEdit->displayEditIcons($content, $params, $conf, $currentRecord, $dataArr, $addURLParamStr);
to */
if(isset($conf) && is_array($conf)){
$content = $GLOBALS['BE_USER']->frontendEdit->displayEditIcons($content, $params, $conf, $currentRecord, $dataArr, $addURLParamStr);
} else {
$content = $GLOBALS['BE_USER']->frontendEdit->displayEditIcons($content, $params, array(), $currentRecord, $dataArr, $addURLParamStr);
}

I am not sure which of the following is relevant to the problem, as I don't know anything about the applicable coding policy:

- Typoscript shouldn't be able to set a value to null, which is expected to be an array
- A function should not expect an array, when a value could be null.
- A function should not delegate values before checking wether they are valid.
(issue imported from #M15194)


Files

bug_15194.diff (1.06 KB) bug_15194.diff Administrator Admin, 2010-07-22 07:55

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #22359: No FE editing with only field edit icons and with "old" feedit extensionClosed2010-03-31

Actions
Is duplicate of TYPO3 Core - Bug #23989: Argument 3 passed to t3lib_frontendedit::displayEditIcons() must be an array, null givenClosedSusanne Moog2010-11-08

Actions
Actions

Also available in: Atom PDF