[TYPO3-core] RFC: #15440: isFirstPartOfStr doesn't work with non-strings

Steffen Kamper info at sk-typo3.de
Thu Aug 12 14:44:12 CEST 2010


Hi,

this is an SVN patch request

Type: bugfix

Branches: 4_4, trunk

BT: http://bugs.typo3.org/view.php?id=15440

These should return TRUE:

t3lib_div::isFirstPartOfStr('24', 24)
t3lib_div::isFirstPartOfStr('24 Bier bitte', 24)


These should return FALSE:

t3lib_div::isFirstPartOfStr(NULL, 0)
t3lib_div::isFirstPartOfStr('', 0)

Solution: cast input values to string

Attached patch + test solves it.

vg Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15440.diff
Type: text/x-patch
Size: 992 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100812/d5346b57/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15440_test.diff
Type: text/x-patch
Size: 979 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100812/d5346b57/attachment-0001.bin>


More information about the TYPO3-team-core mailing list