[TYPO3-core] RFC #13934: Side-effect of substr in t3lib_cs

Martin Kutschker masi-no at spam-typo3.org
Mon May 24 19:16:34 CEST 2010


Xavier Perseguers schrieb:

> Solution:
> Test if an empty string is provided and thus return an empty string
> without performing any additional substr/character set conversion
> operation.

+1 by reading

> I find it a real nobrainer but as the method is said to have been
> unit-tested by Kasper, I wanted to have a review here. Thanks.

I don't know if the function in its current form has been tested and even if the test code is
probably lost by now.

To make unit tests easier (in case some wants to write some) it would perhaps be an idea to split up
the class, so that the PHP/mbstring/iconv mechs can be tested separately without fiddling with
$TYPO3_CONF_VARS.

Masi


More information about the TYPO3-team-core mailing list