Bug #16754
closedsplit returnKey fails to recognize the max property
0%
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)