Project

General

Profile

Actions

Bug #16754

closed

split returnKey fails to recognize the max property

Added by Carlos A over 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-11-30
Due date:
% Done:

0%

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

Description

stdWrap "split" function has a "max" property, that don't work when "returnKey" is used.

If, using typoscript, we want to get the last part of a split, for example using max = 1, thus getting just two parts, we don't get the last part of the split. Instead, the content being split will be exploded without limit, and we will get just the second item of the whole array.

This is implemented at class.tslib_content.php line 4021:

$valArr=explode($conf['token'],$value);

If this behavior was not done on purpose, maybe the script should find out if returnKey and max are being used together and, if so, explode the $value, using the third argument of the explode function, so it can return the whole last part of the split.

(issue imported from #M4594)

Actions

Also available in: Atom PDF