From: Nicole Cordes Date: Tue, 20 Nov 2012 17:03:00 +0000 (+0100) Subject: [BUGFIX] RootlineUtility uses backticks which leads to crashing dbal X-Git-Tag: TYPO3_6-0-0rc2~16 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/67bbef35b5564b0f7a56203ba95cec7c6fcc8acd [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 --- 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);