#97852Item key may not be a string in customPermOptions
Description
The documentation for $GLOBALS[‘TYPO3_CONF_VARS’][‘BE’][‘customPermOptions’] says that item keys may not contain :|,. This is enforced in \TYPO3\CMS\Core\Hooks\TcaItemsProcessorFunctions::populateCustomPermissionOptions using preg_replace.
With PHP 8.0 preg_replace expects strictly a string for the $subject argument. Although the documentation gives an example with a string, there was nothing preventing from using numerical indices until now. The case in point is extension “my_user_management”, which adds custom permissions using numerical indices. It thus makes sense that the Core should take care of casting the values to avoid errors.