Issue Bug Closed

#106975Fix option `maxItemsInResultList` in SuggestWizardController

Kai Strecker 06/25/25, 15:29 updated 12/02/25, 14:37

Description

Setting a page tsconfig like TCEFORM.<table>.<field>.suggest.default.maxItemsInResultList = 20 leads to an error in SuggestWizardController when calling array_splice and passing the number as the second parameter, because the parsed value is never cast to a number, and therefore remains a string. The bug is in this line: https://github.com/TYPO3/typo3/blob/v13.4.14/typo3/sysext/backend/Classes/Controller/Wizard/SuggestWizardController.php#L190

It currently is

$maxItems = $config['maxItemsInResultList'] ?? 10;

but it should be

$maxItems = (int)($config['maxItemsInResultList'] ?? 10);

Thanks for fixing!

Reviews 3

History 25

  1. Gerrit Code Review pushed patch set 1 for main to change 89887 status New Under Review 06/25/25, 16:28

  2. Gerrit Code Review pushed patch set 1 for 13.4 to change 89888 06/25/25, 16:50

  3. Gerrit Code Review pushed patch set 1 for 12.4 to change 89889 06/25/25, 16:50

  4. Anonymous commented and changed status Under Review Resolved done 0 % 100 % 06/25/25, 17:05

    Applied in changeset commit:ba9370c991eba501866be92b0aa92e349ebde199.

  5. Benni Mack changed status Resolved Closed 12/02/25, 14:37