Issue Bug Closed

#19601t3lib_div::trimExplode limit parameter leads to wrong result with non-empty requirement

Oliver Hader 11/12/08, 12:13 updated 08/06/10, 13:29

Description

First, look at the function that was extended during TYPO3 4.3 development:
trimExplode($delim, $string, $onlyNonEmptyValues = false, $limit = 0)

Imagine a list like this:
$string = ‘aa,,bb’;

1) trimExplode(‘,’, $string, false, 2) returns array(‘aa’, ‘,bb’) -> fine
2) trimExplode(‘,’, $string, true, 2) returns array(‘aa’, ‘,bb’) -> false since it should be array(‘aa’, ‘bb’) and the empty value removed before

(issue imported from #M9779)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.