[TYPO3-core] RFC #9779: t3lib_div::trimExplode limit parameter leads to wrong result with non-empty requirement

Steffen Gebert steffen at steffen-gebert.de
Tue Mar 3 14:20:36 CET 2009


Benjamin Mack wrote:
> Another idea would be to do a pre-cleanup in the string before it gets
> exploded:
> 
> $string = str_replace(',,', ',', $string);
> 

This should be a preg_replace like 
preg_replace('/,,+/', ',' $str)
to also match ,,, or ,,,,,,,,,,

Steffen



More information about the TYPO3-team-core mailing list