Project

General

Profile

Actions

Bug #80872

closed

QueryGenerator::getSelectQuery can use Doctrine bind values but throws them away and also the return type is wrong

Added by Christer V about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2017-04-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If an none admin call QueryGenerator::getSelectQuery, bind values will be assign to the $queryBuilder and then thrown away, since the method just returns the string $queryBuilder->getSQL(). This will cause an sql error:

Error: An exception occurred while executing 'SELECT `header`, `uid`, `pid`, `pid`, `deleted` FROM `tt_content` WHERE (`pid` IN (:dcValue1)) AND (tt_content.CType = 'test') AND (`tt_content`.`deleted` = 0) LIMIT 100': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dcValue1)) AND (tt_content.CType = 'test') AND (`tt_content`.`deleted` = 0) L' at line 1

Also the return type is notes as bool|\mysqli_result|object but is actually a string.

Actions

Also available in: Atom PDF