Project

General

Profile

Actions

Bug #25402

closed

PHP Catchable Fatal Error: t3lib_iconWorks::mapRecordTypeToSpriteIconName()

Added by Sven Luzar over 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-03-27
Due date:
% Done:

100%

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

Description

The hook in line 865 passes an array to call a user function, but the method t3lib_div::callUserFunction needs a variable passed by reference. An easy fix is possible:

change line

$recordType6 = t3lib_div::callUserFunction($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'], array('row' => $row), $ref);

to lines

$param = array('row' => $row);
$recordType6 = t3lib_div::callUserFunction($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'], $param, $ref);

Stacktrace:

Fatal error: Cannot pass parameter 2 by reference in /usr/share/typo3/typo3_src-4.5.0/t3lib/class.t3lib_iconworks.php on line 853 Call Stack: 0.0035 655032
1. {main}() /usr/share/typo3/typo3_src-4.5.0/typo3/mod.php:0 0.2960 10854440
2. require('/usr/share/typo3/typo3_src-4.5.0/typo3/sysext/recordlist/mod1/index.php') /usr/share/typo3/typo3_src-4.5.0/typo3/mod.php:51 0.3188 12451960
3. SC_db_list->main() /usr/share/typo3/typo3_src-4.5.0/typo3/sysext/recordlist/mod1/index.php:514 0.3558 13210152
4. recordList->generateList() /usr/share/typo3/typo3_src-4.5.0/typo3/sysext/recordlist/mod1/index.php:310 0.4306 14338728
5. localRecordList->getTable() /usr/share/typo3/typo3_src-4.5.0/typo3/class.db_list.inc:303 0.4334 14379688 
6. localRecordList->renderListRow() /usr/share/typo3/typo3_src-4.5.0/typo3/class.db_list_extra.inc:553 0.4337 14381744
7. t3lib_iconWorks::getSpriteIconForRecord() /usr/share/typo3/typo3_src-4.5.0/typo3/class.db_list_extra.inc:670 0.4339 14382864
8. t3lib_iconWorks::mapRecordTypeToSpriteIconClass() /usr/share/typo3/typo3_src-4.5.0/t3lib/class.t3lib_iconworks.php:764 0.4339 14382864
9. t3lib_iconWorks::mapRecordTypeToSpriteIconName() /usr/share/typo3/typo3_src-4.5.0/t3lib/class.t3lib_iconworks.php:791

(issue imported from #M18046)

Actions

Also available in: Atom PDF