Project

General

Profile

Actions

Bug #99184

closed

ValueException in GeneralUtility intExplode/trimExplode

Added by Stefan Froemken over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
Start date:
2022-11-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Hi,

If you call GeneralUtility::intExplode() or GeneralUtility::trimExplode() with an empty string as delimiter a ValueException will be thrown since PHP 8.0.

Maybe such calls should be wrapped in a try-catch block?

Stefan


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #99178: Drop fallback for explode callsClosedOliver Klee2022-11-24

Actions
Actions #1

Updated by Stefan Froemken over 1 year ago

  • Related to Task #99178: Drop fallback for explode calls added
Actions #3

Updated by Georg Ringer over 1 year ago

  • Status changed from New to Needs Feedback

Thanks for creating this issue. TBH I would close this issue and don't change anything - this will help the developers to find the issue and solve it. what should happen in the catch block?

Actions #4

Updated by Stefan Froemken over 1 year ago

  • Status changed from Needs Feedback to Closed

Hi Georg,

sorry. Don't remember anymore in which case I need that.

In glossary2 I had a ABCDE-list and want to convert them into an [A, B, C, D, E] array. Currently I have solved it with str_split

In jwtools2 I want to split content somehow. Currently solved with preg_match.

So, no need to investigate more time here, as I have found alternative solutions

Stefan

Actions

Also available in: Atom PDF