[TYPO3-core] RFC: small enhancement to t3lib_div::arrayToLogString()
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sun Jun 4 19:41:06 CEST 2006
Hi!
Problem: the inline doc says that argument $valueList may be either an
array or a string (comma delimited list). Also the docs says that an
empty list means "all array keys". But only an empty array, not an empty
string, is accepted. This is a bit annoying/confusing.
Solution: use t3lib_div::trimExplode() instead of explode(). The former
may ignore empty keys, but the latter will always return an array with
at least one element (an empty string).
The patch also moves count() outside of the loop and uses || instead of
AND/OR which is more in sync with the usual TYPO3 code.
Masi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayToLogString.diff
Type: text/x-diff
Size: 677 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060604/26e608bb/attachment.bin
More information about the TYPO3-team-core
mailing list