Project

General

Profile

Actions

Bug #65435

closed

Error fatal when using RecordListHookInterface

Added by Eric Chavaillaz about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2015-03-01
Due date:
% Done:

0%

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

Description

Hi,

If I try to use the hook in the makeControl method (in typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php) by setting the interface RecordListHookInterface, I have an error fatal thrown when showing the list module :

 #1: PHP Warning: Invalid argument supplied for foreach() in .../typo3/httpdocs/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php line 1406
TYPO3\CMS\Core\Error\Exception thrown in file .../typo3/httpdocs/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 102.

7 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "Invalid argument supplied for foreach()", ".../typo3/httpdocs/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php", 1406, array)

...typo3/httpdocs/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php:
01404:     // before calling the hook
01405:     foreach ($cells as $section => $actions) {
01406:      foreach ($actions as $actionKey => $action) {
01407:       $cells[$actionKey] = $action;
01408:      }

I think it's a regression when the "primary" and "secondary" sub-key were introduced.

By the way, in my hook I just return the value to test it.

Thanks!

Actions

Also available in: Atom PDF