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

Steffen Kamper info at sk-typo3.de
Tue Mar 3 14:35:30 CET 2009


Steffen Gebert schrieb:
> 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
> 

not so easy as you have to differ between
'13',,'15' and '13,,12',,'15'
may be it looks constructed but bossible in strings.

vg Steffen


More information about the TYPO3-team-core mailing list