Project

General

Profile

Actions

Bug #34780

closed

tslib_fe->initFEuser uses TYPO3_DB->cleanIntList with empty value

Added by Christian Finkemeier about 12 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-03-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

The main script index_ts.php calls the tslib_fe method initFEuser.

This method calls the TYPO3_DB->cleanIntList method with a parameter fetched by t3lib_div::_GP('pid') on line 623 (TYPO3 Version 4.5.12).

If there is no GET parameter "pid" the parameter passed to TYPO3_DB->cleanIntList is NULL but had to be a string type to call the t3lib_div::intExplode method

So every time you call the index_ts.php without the GET parameter "pid" the sys_log table will be filled with an entry like this:

"Core: Error handler (FE): PHP Warning: explode() expects parameter 2 to be string, array given in /typo3_src-4.5.12/t3lib/class.t3lib_div.php line 1946" 

"Core: Error handler (FE): PHP Warning: array_map(): Argument #2 should be an array in /typo3_src-4.5.12/t3lib/class.t3lib_div.php line 1949"

This bug could be easily solved by mapping the parameter to string like this:

typo3/sysext/cms/tslib/class.tslib_fe.php: line 623
$this->fe_user->checkPid_value = $GLOBALS['TYPO3_DB']->cleanIntList((string)t3lib_div::_GP('pid'));    // List of pid's acceptable

best regards
Christian


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #34781: t3lib_userauth->getAuthInfoArray calls TYPO3_DB->cleanIntList without string parameterClosed2012-03-13

Actions
Actions

Also available in: Atom PDF