From 67bbef35b5564b0f7a56203ba95cec7c6fcc8acd Mon Sep 17 00:00:00 2001
From: Nicole Cordes <nicole@cordes.co>
Date: Tue, 20 Nov 2012 18:03:00 +0100
Subject: [PATCH] [BUGFIX] RootlineUtility uses backticks which leads to
 crashing dbal

In some queries backticks are used to generate the WHERE clause. Those
backticks lead to an error when using dbal. Therefore they have to be
removed.

Change-Id: If6aa29f73fda93cfc122af51201730cc6475a8c1
Fixes: #43168
Release: 6.0
Reviewed-on: http://review.typo3.org/16629
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
---
 typo3/sysext/core/Classes/Utility/RootlineUtility.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/typo3/sysext/core/Classes/Utility/RootlineUtility.php b/typo3/sysext/core/Classes/Utility/RootlineUtility.php
index 5d0e7d351769..ff55f49badcd 100644
--- a/typo3/sysext/core/Classes/Utility/RootlineUtility.php
+++ b/typo3/sysext/core/Classes/Utility/RootlineUtility.php
@@ -244,17 +244,17 @@ class RootlineUtility {
 				} elseif ($configuration['foreign_field']) {
 					$table = $configuration['foreign_table'];
 					$field = $configuration['foreign_field'];
-					$whereClauseParts = array('`' . $field . '` = ' . intval($uid));
+					$whereClauseParts = array($field . ' = ' . intval($uid));
 					if (isset($configuration['foreign_match_fields']) && is_array($configuration['foreign_match_fields'])) {
 						foreach ($configuration['foreign_match_fields'] as $field => $value) {
-							$whereClauseParts[] = '`' . $field . '` = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $table);
+							$whereClauseParts[] = $field . ' = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $table);
 						}
 					}
 					if (isset($configuration['foreign_table_field'])) {
 						if (intval($pageRecord['sys_language_uid']) > 0) {
-							$whereClauseParts[] = '`' . trim($configuration['foreign_table_field']) . '` = \'pages_language_overlay\'';
+							$whereClauseParts[] = trim($configuration['foreign_table_field']) . ' = \'pages_language_overlay\'';
 						} else {
-							$whereClauseParts[] = '`' . trim($configuration['foreign_table_field']) . '` = \'pages\'';
+							$whereClauseParts[] = trim($configuration['foreign_table_field']) . ' = \'pages\'';
 						}
 					}
 					$whereClause = implode(' AND ', $whereClauseParts);
-- 
GitLab