Project

General

Profile

Actions

Bug #16851

closed

errors from getStorageSiterootPids() in class.tslib_fe.php with userdef. RealURL conf., because of unitialized $this->rootLine

Added by Joscha Feth almost 18 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2007-01-10
Due date:
% Done:

0%

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

Description

I get the following errors:
-------------------- 8< ---------------------
Warning: reset() [function.reset]: Passed variable is not an array or object in /path/to/typo3_src-4.0.4/typo3/sysext/cms/tslib/class.tslib_fe.php on line 3708

Warning: Variable passed to each() is not an array or object in /path/to/typo3_src-4.0.4/typo3/sysext/cms/tslib/class.tslib_fe.php on line 3709

Warning: reset() [function.reset]: Passed variable is not an array or object in /path/to/typo3_src-4.0.4/typo3/sysext/cms/tslib/class.tslib_fe.php on line 3708

Warning: Variable passed to each() is not an array or object in /path/to/typo3_src-4.0.4/typo3/sysext/cms/tslib/class.tslib_fe.php on line 3709
-------------------- 8< ---------------------

from getStorageSiterootPids() in class.tslib_fe.php.
It seems, as if $this->rootLine is accessed before initialization. This leads to errors from reset($this->rootLine) and each($this->rootLine) in line 3708 and 3709 of cms/tslib/class.tslib_fe.php.

I can only presume it is because of my realurl configuration (attached), but I can't find an error in there. And even if there is an error, the function should check for is_array($this->rootLine) before doing reset() and each() on it.

Patch would be adding:

if(!is_array($this->rootLine)) {
return array();
}

to the function.
(issue imported from #M4768)


Files

realurl_config.php (6.19 KB) realurl_config.php Administrator Admin, 2007-01-10 23:55
class.tslib_fe_4_1_6.patch (815 Bytes) class.tslib_fe_4_1_6.patch Administrator Admin, 2008-03-31 22:40
class.tslib_fe_4_0_8.patch (816 Bytes) class.tslib_fe_4_0_8.patch Administrator Admin, 2008-03-31 22:40
patch_4768.patch (546 Bytes) patch_4768.patch Administrator Admin, 2008-04-03 23:04
Actions

Also available in: Atom PDF