Issue Bug Closed

#42921t3lib_div->trimExplode fills database table sys_log

Christian Finkemeier 11/13/12, 15:36 updated 10/02/18, 12:14

Description

There are several uses of t3lib_div::trimExplode with wrong parameter types.

The second parameter must be a string, otherwise a php warning is stored to the sys_log database table, e.g. in tslib_fe::initFEuser (line 623) where the argument is null or in t3lib_userAuth::getAuthInfoArray (line 1299) where the argument is an integer…

This could be easily resolved by mapping the variable $string to string like this:

public static function trimExplode($delim, $string, $removeEmptyValues = FALSE, $limit = 0) {
        $explodedValues = explode($delim, (string)$string);

best regards
Christian

Reviews 6