Bug #99184
closedValueException in GeneralUtility intExplode/trimExplode
0%
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
Updated by Stefan Froemken almost 2 years ago
- Related to Task #99178: Drop fallback for explode calls added
Updated by Stefan Froemken almost 2 years ago
See ChangeLog of PHP 8.0: https://www.php.net/manual/de/function.explode.php
Updated by Georg Ringer almost 2 years 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?
Updated by Stefan Froemken almost 2 years 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