Commit 40e14d3f authored by Morton Jonuschat's avatar Morton Jonuschat Committed by Wouter Wolters
Browse files

[BUGFIX] DBAL: Pass database connection to SQL compiler

The SQL compilers need the current database connection for properly
quoting identifiers. The constructor declares them a required argument
but the SQL parser didn't pass the database connection on instanciation.

Resolves: #69528
Releases: master
Change-Id: I8cd67bb07d954b73c1e8f1de93f208ca7a835c08
Reviewed-on: http://review.typo3.org/43017

Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent e864a5c9
......@@ -88,8 +88,8 @@ class SqlParser {
*/
public function __construct(DatabaseConnection $databaseConnection = NULL) {
$this->databaseConnection = $databaseConnection ?: $GLOBALS['TYPO3_DB'];
$this->sqlCompiler = GeneralUtility::makeInstance(SqlCompilers\Adodb::class);
$this->nativeSqlCompiler = GeneralUtility::makeInstance(SqlCompilers\Mysql::class);
$this->sqlCompiler = GeneralUtility::makeInstance(SqlCompilers\Adodb::class, $this->databaseConnection);
$this->nativeSqlCompiler = GeneralUtility::makeInstance(SqlCompilers\Mysql::class, $this->databaseConnection);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment