Project

General

Profile

Actions

Bug #55838

closed

revExplode returns invalid values if no delimiter in string

Added by Alexander Stehlik over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
Start date:
2014-02-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

Description

Currently revExplode will return an invalid value in this case:

  1. $count is set to 2
  2. $delimiter does not exist in string

Example:

GeneralUtility::revExplode('_', 'test', 2),

Will return

array('', 'est')

but should return

array('test')

This also leads to an error in \TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter->filterInlineChildren() when updating file reference records in a content element:

#1317178794: No fileusage (sys_file_reference) found for given UID.

because one letter is cut off from the UID.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #55564: Improve GeneralUtility::revExplode performanceClosedAndreas Wolf2014-02-01

Actions
Related to TYPO3 Core - Bug #56405: GeneralUtility::revExplode returns unexpected result to getSingleField_typeFlex_draw()Closed2014-02-28

Actions
Actions

Also available in: Atom PDF