#106975Fix option `maxItemsInResultList` in SuggestWizardController
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
-
Gerrit Code Review pushed patch set 1 for main to change 89887 status
NewUnder Review 06/25/25, 16:28 -
Gerrit Code Review pushed patch set 1 for 13.4 to change 89888 06/25/25, 16:50
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 89889 06/25/25, 16:50
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 06/25/25, 17:05 -
Benni Mack changed status
ResolvedClosed 12/02/25, 14:37
Applied in changeset commit:ba9370c991eba501866be92b0aa92e349ebde199.