Issue Bug Closed

#55838revExplode returns invalid values if no delimiter in string

Alexander Stehlik 02/10/14, 13:44 updated 10/23/17, 21:42

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.

Reviews 1