Project

General

Profile

Actions

Bug #18589

closed

Split does not work with returnKey = 0

Added by Dirk Weise about 16 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2008-04-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.
Will report to core list.

(issue imported from #M8064)


Files

split_patch.patch (612 Bytes) split_patch.patch Administrator Admin, 2008-04-08 21:38
split_patch__v2.patch (636 Bytes) split_patch__v2.patch Administrator Admin, 2008-04-11 22:29
Actions #1

Updated by Dirk Weise about 16 years ago

Attached patch with t3lib_div::testInt() instead of is_numeric() as requested by Oliver Hader.

Actions #2

Updated by Oliver Hader about 16 years ago

Committed to SVN:
  • TYPO3_4-1 (rev. 3556) --> TYPO3 4.1.7
  • TYPO3_4-2 (rev. 3557)
Actions

Also available in: Atom PDF