[TYPO3-core] RFC: #8064: Split does not work with returnKey = 0

Dirk Weise typo3-N0SPAM at N0SPAM-dirk-weise.de
Tue Apr 8 21:44:49 CEST 2008


Moin,

this is a SVN patch request.

Type: Bugfix

Branches: 4_2, 4_1 ?

Bugtracker Reference:
http://bugs.typo3.org/view.php?id=8064

Problem:
You can't use split to return the first element of a splited value. It 
will return the whole string instead.
split {
   token.char = 10
   returnKey = 0
}

Checking a var that  contains a zero in an if statement always resolves 
to false....

Resolution:
Checking with is_numeric().
See attached patch, it's a no brainer.

Cheers
dirk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: split_patch.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080408/7c87b8ac/attachment-0001.txt 


More information about the TYPO3-team-core mailing list