Bug #65123
closedGeneralUtility::rmFromList() regression bug
100%
Description
Using TYPO3 6.2.9.
GeneralUtility::rmFromList() suffers from a regression bug. It is not handling the removal of list items properly, if the list contains the item several times. The behaviour of str_replace() is documented in the PHP documentation (see http://php.net/manual/en/function.str-replace.php section "Caution: Replacement order gotcha".
The old implementation not using str_replace() but looping through the elements was working as expected.
Reproducible code:
$param1 = "A";
$param2 = "A,A,A,A,A,A,A,A";
$result = GeneralUtility::rmFromList($param1, $param2);
Expected result:
$result should be empty
Returned result:
$result is "A,A,A,A"
Updated by Markus Klein almost 10 years ago
- Category set to Backend API
- Status changed from New to Accepted
- Assignee set to Markus Klein
- Priority changed from Should have to Must have
- Target version set to next-patchlevel
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36967
Updated by Gerrit Code Review almost 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36990
Updated by Gerrit Code Review almost 10 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36990
Updated by Markus Klein almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset de88e57e0d5647b3a8d94ef998eeba4bbe6fd1d5.
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36991
Updated by Markus Klein almost 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 100f65eac1f112c1ac1462921ed77c73da3923ac.