From 725505c725d6ac34b29062f89fac2ddbf55819ad Mon Sep 17 00:00:00 2001
From: Oliver Hader <oliver@typo3.org>
Date: Wed, 6 Dec 2017 23:28:06 +0100
Subject: [PATCH] [FOLLOWUP][FEATURE] Show page translations in list module

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>
---
 .../recordlist/Classes/RecordList/DatabaseRecordList.php     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
index 4017eec0df82..4f6f7a62af3c 100644
--- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
+++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
@@ -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
+                    )
                 )
             );
         }
-- 
GitLab