Project

General

Profile

Actions

Bug #23245

closed

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

Added by Daniel Mueller almost 14 years ago. Updated over 5 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 #1

Updated by Daniel Mueller almost 14 years ago

PS:

This was the error reported by frontend:

t3lib_error_Exception

PHP Catchable Fatal Error: Argument 3 passed to t3lib_frontendedit::displayEditIcons() must be an array, null given, called in /home/u0052496198/public_html/typo3-4.3.3-update/cms/typo3/sysext/cms/tslib/class.tslib_content.php on line 7911 and defined in /home/u0052496198/public_html/typo3-4.3.3-update/cms/t3lib/class.t3lib_frontendedit.php line 135

Actions #2

Updated by Daniel Mueller almost 14 years ago

PPS:

Version is Typo3 4.3.3 How do I change this?

Actions #3

Updated by Chris topher almost 14 years ago

Hi ...?,

could you put your real name in the reporter field? You can do so here: http://typo3.org/register
That would make communication easier!

Please create a patch out of your changes and send it to the Core List!
See here for more information: http://typo3.org/teams/core/core-mailinglist-rules/

Actions #4

Updated by Heath Kouns over 13 years ago

Hi,
I ran into this same issue last night when I upgraded to 4.4.6. I got the same error... (line numbers were slightly diffferent) It only showed up on two of the pages in my page tree... (and I couldn't figure out what was different) ... So I implemented the code change described above (directly...not a patch file) ... and it fixed the issue.

I see this issue is marked with status of "Feedback" ... is there a plan to incorporate it into the core? OR (and I guess this is my biggest concern) ... this is not the root cause and this fix is only a "band-aid"... If this is the case, is there another solution?

Thanks

Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF