[BUGFIX] Do not use named parameter for list of orphan records ids 30/57230/2
authorSascha Egerer <sascha@sascha-egerer.de>
Wed, 13 Jun 2018 19:18:30 +0000 (21:18 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 15 Jun 2018 14:24:52 +0000 (16:24 +0200)
The OrphanRecordsCommand fetches records by a list of ids.
This list can get very big so the database will fail if the
number of placesholders exceeds its limit.

Resolves: #85257
Related: #80875
Releases: master, 8.7
Change-Id: Ia6b9398f4e54157301abb57fac5adb7f51130907
Reviewed-on: https://review.typo3.org/57230
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php

index 07247e8..b7a67e8 100644 (file)
@@ -102,7 +102,8 @@ Manual repair suggestions:
                 ->where(
                     $queryBuilder->expr()->notIn(
                         'uid',
-                        $queryBuilder->createNamedParameter($idList, Connection::PARAM_INT_ARRAY)
+                        // do not use named parameter here as the list can get too long
+                        array_map('intval', $idList)
                     )
                 )
                 ->orderBy('uid')