[TYPO3-core] RFC: Feature #2883 / t3lib_div::trimExplode

Michael Stucki michael at typo3.org
Fri Sep 7 16:49:13 CEST 2007


Martin Kutschker wrote:

>> Thanks so far! I was just wondering if there is a reason for keeping
>> redundant code inside the function?
> 
> Speed. The "if ($onlyNonEmptyValues)" needs only to be executed once) and
> mind the array_merge() which is only necessary (to reindex the array) when
> $onlyNonEmptyValues is set.
> 
> Please, don't "beautify". Then we could have lived with the old code.

Ah, I see. However, it would be helpful if there was a comment above these
lines, because my memory tells me that we clean up stuff like this every
once in a while.

In case of this function, I agree that it's worth the redundancy.
However, for most other positions, the general rule should be to avoid that.

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list