Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 5100) +++ t3lib/class.t3lib_div.php (working copy) @@ -1654,7 +1654,7 @@ * @return array Exploded values */ public static function trimExplode($delim, $string, $removeEmptyValues = false, $limit = 0) { - $explodedValues = $limit ? explode($delim, $string, $limit) : explode($delim, $string); + $explodedValues = explode($delim, $string); $result = array_map('trim', $explodedValues); @@ -1668,6 +1668,10 @@ $result = $temp; } + if ($limit != 0) { + $result = array_slice($result, 0, $limit); + } + return $result; }