Project

General

Profile

Actions

Bug #18589

closed

Split does not work with returnKey = 0

Added by Dirk Weise over 16 years ago. Updated over 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

Also available in: Atom PDF