Issue Bug Closed

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

Daniel Mueller 11/08/10, 17:41 updated 10/02/18, 12:23

Description

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.4.4-final/cms/typo3/sysext/cms/tslib/class.tslib_content.php on line 8154 and defined in /home/u0052496198/public_html/typo3-4.4.4-final/cms/t3lib/class.t3lib_frontendedit.php line 135

Editing sysext/cms/class.tslib_content.php at before line 8153 helps to provide an empty array, when no array is given:

if(!is_array()) $conf = array();
$content = $GLOBALS[‘BE_USER’]->frontendEdit->displayEditIcons($content, $params, $conf, $currentRecord, $dataArr, $addURLParamStr);

It’s hard to reproduce. But somehow I managed to set $conf to null. Possibly unsetting displayEditIcons in typoscript:
displayEditIcons >

I noticed this in Typo3 4.3.3 for the first time:
http://bugs.typo3.org/view.php?id=15194

I wonder why t3lib_frontendedit::displayEditIcons() expects an array, when many other functions don’t do any type-checking at all.
(issue imported from #M16308)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.