From 191aa8ce51375402f00c8cf7c674702912517c20 Mon Sep 17 00:00:00 2001 From: Sven Luzar Date: Mon, 28 Mar 2011 13:03:02 +0200 Subject: [PATCH] [BUGFIX] Fix PHP Catchable Fatal Error in t3lib_iconWorks The hook in t3lib_iconWorks::mapRecordTypeToSpriteIconName() passes an array to call a user function, but the method t3lib_div::callUserFunction expects a variable being passed by reference. Assigning the array to a variable fixes this error. Thanks to Haymo Meran (Gentics) for sponsoring this fix with 80 beers at the bug auction at T3BOARD11. Change-Id: I445ae05aa79913cb152da06cc66941db3fdf9227 Resolves: #25402 Reviewed-on: http://review.typo3.org/1290 Reviewed-by: Oliver Hader Tested-by: Oliver Hader --- t3lib/class.t3lib_iconworks.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t3lib/class.t3lib_iconworks.php b/t3lib/class.t3lib_iconworks.php index 5d8288301eda..541bec448980 100644 --- a/t3lib/class.t3lib_iconworks.php +++ b/t3lib/class.t3lib_iconworks.php @@ -861,7 +861,12 @@ final class t3lib_iconWorks { $recordType[5] = str_replace('###TYPE###', $row[$column], $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['mask']); } if (isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'])) { - $recordType[6] = t3lib_div::callUserFunction($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'], array('row' => $row), $ref); + $parameters = array('row' => $row); + $recordType[6] = t3lib_div::callUserFunction( + $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'], + $parameters, + $ref + ); } } else { foreach ($recordType AS $key => $type) { -- 2.20.1