Bug #84022

cObj->searchWhere is broken

Added by Sven Juergens over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2018-02-23
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

hi,

The returned string of cObj->searchWhere has changed with TYPO3 8 and Doctrine, respectively.

before you got a string like this

(testTable.field LIKE '%test%' 
OR testTable.field1 LIKE '%test%' 
OR testTable.fiel2 LIKE '%test%' 
OR testTable.field3 LIKE '%test%')

now with TYPO3 8 you got a string like this

`testTable`.`field ` LIKE :dcValue1) 
OR (`testTable`.`field1` LIKE :dcValue2) 
OR (`testTable`.`field2` LIKE :dcValue3) 
OR (`testTable`.`field3` LIKE :dcValue4)

With the new String you got a SQL Error like this:

Value for :dcValue2 not found in params array. Params array key should be "dcValue2" 

Related issues

Related to TYPO3 Core - Task #78437: Refactor use of queryBuilder to use prepared statements Closed 2016-10-26

Associated revisions

Revision c882e1ca (diff)
Added by Georg Ringer over 1 year ago

[BUGFIX] Return correct query part in ContentObjectRenderer::searchWhere

Avoid using a prepared statement to return the final query part.

Resolves: #84022
Releases: master, 8.7
Change-Id: I31c44172221962c1dbb3d97d02f6cfa61449d20a
Reviewed-on: https://review.typo3.org/55914
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Reviewed-by: Joerg Boesche <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Sven Juergens <>
Tested-by: Sven Juergens <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 2a1a2c43 (diff)
Added by Georg Ringer over 1 year ago

[BUGFIX] Return correct query part in ContentObjectRenderer::searchWhere

Avoid using a prepared statement to return the final query part.

Resolves: #84022
Releases: master, 8.7
Change-Id: I31c44172221962c1dbb3d97d02f6cfa61449d20a
Reviewed-on: https://review.typo3.org/55957
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Georg Ringer over 1 year ago

  • Related to Task #78437: Refactor use of queryBuilder to use prepared statements added

#2 Updated by Georg Ringer over 1 year ago

  • Category set to Database API (Doctrine DBAL)
  • Is Regression set to Yes

#3 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55914

#4 Updated by Sven Juergens over 1 year ago

HI Georg,

many thanks for your work.
The bugfix works like a charm :)

Best Regards
Sven

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55957

#6 Updated by Georg Ringer over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF