Project

General

Profile

Actions

Bug #19601

closed

t3lib_div::trimExplode limit parameter leads to wrong result with non-empty requirement

Added by Oliver Hader over 15 years ago. Updated over 13 years ago.

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

0%

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

Description

First, look at the function that was extended during TYPO3 4.3 development:
trimExplode($delim, $string, $onlyNonEmptyValues = false, $limit = 0)

Imagine a list like this:
$string = 'aa,,bb';

1) trimExplode(',', $string, false, 2) returns array('aa', ',bb') -> fine
2) trimExplode(',', $string, true, 2) returns array('aa', ',bb') -> false since it should be array('aa', 'bb') and the empty value removed <b>before</b>

(issue imported from #M9779)


Files

9779.diff (695 Bytes) 9779.diff Administrator Admin, 2009-03-02 12:35
9779_tests.diff (1.36 KB) 9779_tests.diff Administrator Admin, 2009-03-02 12:36
0009779_followup.patch (3.29 KB) 0009779_followup.patch Administrator Admin, 2009-10-20 12:25

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #20068: simplify and speed up t3lib_div::trimExplode()ClosedIngo Renner2009-02-21

Actions
Related to TYPO3 Core - Feature #17299: Enable/integrate conditions in Page TSconfigClosedOliver Hader2007-05-11

Actions
Actions

Also available in: Atom PDF