Skip to content
Snippets Groups Projects
Commit 62dabfe1 authored by Ingmar Schlecht's avatar Ingmar Schlecht Committed by Susanne Moog
Browse files

[BUGFIX] Wrong query in RecordCollectionRepository

If t3lib_collection_RecordCollectionRepository::queryMultipleRecords()
is called without any argument the SQL statement is wrong since
t3lib_BEfunc::deleteClause() starts with "AND".

Change-Id: I96efb31d142e89968cfcfa66ba6d1fda570b8595
Fixes: #36841
Releases: 6.0, 4.7
Reviewed-on: http://review.typo3.org/10998
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
parent 8f629b2a
No related branches found
No related tags found
No related merge requests found
......@@ -139,10 +139,16 @@ class t3lib_collection_RecordCollectionRepository {
protected function queryMultipleRecords(array $conditions = array()) {
$result = NULL;
if (count($conditions) > 0) {
$conditionsWhereClause = implode(' AND ', $conditions);
} else {
$conditionsWhereClause = '1=1';
}
$data = $this->getDatabase()->exec_SELECTgetRows(
'*',
$this->table,
implode(' AND ', $conditions) . t3lib_BEfunc::deleteClause($this->table)
$conditionsWhereClause . t3lib_BEfunc::deleteClause($this->table)
);
if ($data !== NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment