[FOLLOWUP][FEATURE] Show page translations in list module 53/54953/2
authorOliver Hader <oliver@typo3.org>
Wed, 6 Dec 2017 22:28:06 +0000 (23:28 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Thu, 7 Dec 2017 14:10:32 +0000 (15:10 +0100)
In case the list module is used for a particular page and
then removing the very same page in the pagetree will lead
to an SQL error since $this->id is null. Using proper
parameter type solves this issue.

Resolves: #83016
Releases: master
Change-Id: I07265ed5590062ff043cf0f73b9dbe42f70e9764
Reviewed-on: https://review.typo3.org/54953
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 4017eec..4f6f7a6 100644 (file)
@@ -3240,7 +3240,10 @@ class DatabaseRecordList
             $queryBuilder->andWhere(
                 $queryBuilder->expr()->eq(
                     $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'],
-                    $this->id
+                    $queryBuilder->createNamedParameter(
+                        $this->id,
+                        \PDO::PARAM_INT
+                    )
                 )
             );
         }