Project

General

Profile

Actions

Bug #39302

closed

PHP Warning: Invalid argument supplied for foreach() in t3lib/class.t3lib_timetrack.php line 397, 404, 436

Added by Philipp Gampe almost 12 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-07-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.4
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

To reproduce, use the admin penal and enable "tree display" and "display all times".

Call Stack
#    Time    Memory    Function    Location
1    0.0002    245968    {main}( )    ../index.php:0
2    0.0029    1977104    require( '/home/phil/t3-playground/t3-git/typo3/sysext/cms/tslib/index_ts.php' )    ../index.php:42
3    2.5471    23060512    t3lib_tsfeBeUserAuth->displayAdminPanel( )    ../index_ts.php:305
4    2.5471    23060560    tslib_AdminPanel->display( )    ../class.t3lib_tsfebeuserauth.php:183
5    2.5478    23118680    tslib_AdminPanel->getTSDebugModule( )    ../class.tslib_adminpanel.php:268
6    2.5484    23122880    t3lib_timeTrack->printTSlog( )    ../class.tslib_adminpanel.php:544
7    2.5494    23142936    t3lib_timeTrack->fixContent( )    ../class.t3lib_timetrack.php:262
8    2.5494    23143576    xdebug_print_function_stack ( )    ../class.t3lib_timetrack.php:396

fixContent() seems to insert the actual tree elements into the admin panel and is called the first time by printTSlog() and later recursively by itself.

The actual calling line is:

           // Parsing the registeret content and create icon-html for the tree
        $this->tsStackLog[$arr['0.'][0]]['content'] = $this->fixContent($arr['0.']['0.'], $this->tsStackLog[$arr['0.'][0]]['content'], '', 0, $arr['0.'][0]);

The key $arr['0.']['0.'] does not exist. Thus I changed it to:

           // Parsing the registered content and create icon-html for the tree
        $this->tsStackLog[$arr['0.'][0]]['content'] = $this->fixContent($arr['0.'], $this->tsStackLog[$arr['0.'][0]]['content'], '', 0, $arr['0.'][0]);

And it seems to work again.

However, this line was not modified since the initial commit by Kasper, nor was the surrounding code much modified.

git blame -L 261,262 t3lib/class.t3lib_timetrack.php |cat
c32f068c (Kasper Skårhøj 2004-09-09 02:26:26 +0000 261)             // Parsing the registeret content and create icon-html for the tree
c32f068c (Kasper Skårhøj 2004-09-09 02:26:26 +0000 262)         $this->tsStackLog[$arr['0.'][0]]['content'] = $this->fixContent($arr['0.']['0.'], $this->tsStackLog[$arr['0.'][0]]['content'], '', 0, $arr['0.'][0]);

Thus I wonder when it broke.

Can someone reduce this on lower branches than 6.0?


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #41213: Tree view in admin panel is broken on PHP 5.4ClosedPhilipp Gampe2012-09-21

Actions
Actions

Also available in: Atom PDF