[TYPO3-core] RFC #9667: Feature: Use t3lib_div::trimExplode() in t3lib_div::intExplode()

Niels Pardon mail at niels-pardon.de
Tue Oct 28 20:25:51 CET 2008


This is an SVN patch request.

Type: New feature

Bugtracker references:
http://bugs.typo3.org/view.php?id=9667

Branches:
trunk

Problem:
If you call t3lib_div::intExplode() with an empty string as string to
explode you will get back an one-element-array.

If you want to parse e.g. a list of UIDs from TypoScript and the user
has left the TypoScript variable empty you'll expect an empty array of
UIDs and not an one-element-array.

Solution:
By using t3lib_div::trimExplode() in t3lib_div::intExplode() and
allowing to pass the parameters like $onlyNonEmptyValues down to the
call to t3lib_div::trimExplode() you can get the expected result.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 9667.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081028/3da64c30/attachment.txt 


More information about the TYPO3-team-core mailing list