Project

General

Profile

Actions

Bug #97852

closed

Item key may not be a string in customPermOptions

Added by Francois Suter over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Miscellaneous
Target version:
Start date:
2022-07-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75024

Actions #2

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74949

Actions #3

Updated by Anonymous over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF