Deprecation: #99900 - $limit parameter of GeneralUtility::intExplode()

See forge#99900

Description

The static method GeneralUtility::intExplode() has a lesser known fourth parameter $limit. The reason it was added to the intExplode() method is purely historical, when it used to extend the trimExplode() method. The dependency was resolved, but the parameter stayed. As this method is supposed to only return int values in an array, the $limit parameter is now deprecated.

Impact

Calling GeneralUtility::intExplode() with the fourth parameter $limit will trigger a deprecation warning and will add an entry to the deprecation log.

Affected installations

TYPO3 installations that call GeneralUtility::intExplode() with the fourth parameter $limit.

Migration

In the rare case that you are using the $limit parameter you will need to switch to PHP's native explode() function, and then use array_map() to convert the resulting array to integers. If that's impractical, you can simply copy the old intExplode method to your own code.