Project

General

Profile

Actions

Bug #72959

closed

QueryGenerator $conf['comparison'] as integer type

Added by Ralph Brugger about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2016-01-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Problem occures when using direct_mailSpecial recipient list / special query / "between"

I'm mot sure if this should be fixed in the core or in direct_mail.
I thing it's a core issue.

direct_mail
Recipient List
special query
typ3 "between"

TYPO3 6.2.nn

AND tx_rsmbsttools_newsletter LIKE '%101%' AND tx_rsmbsttools_newsletter LIKE '%%'

TYPO3 7.6.nn

AND tx_rsmbsttools_newsletter LIKE '%101%' AND tx_rsmbsttools_newsletter LIKE *'%#VALUE1#%'*)

The problem is inside the QueryGenerator.php (TYPO3\CMS\Core\Database\QueryGenerator)

6.2.nn

public function getQuerySingle($conf, $first) {
...
if ($conf['comparison'] == 37 || $conf['comparison'] == 36 || $conf['comparison'] *==* 66 || $conf['comparison'] == 67 || $conf['comparison'] == 100 || $conf['comparison'] == 101) {

7.6.nn

public function getQuerySingle($conf, $first){
...
if ($conf['comparison'] === 37 || $conf['comparison'] === 36 || $conf['comparison'] === 66 || $conf['comparison'] === 67 || $conf['comparison'] === 100 || $conf['comparison'] === 101) {

The $conf['comparison'] under 6.7.x will check the type, and the 66 is string-type, so that _$conf['comparison'] === 66 won't match.

The value of $conf['comparison'] is a result from a select list:

<option value="66">contains</option>

So it should be converted to int to let int comparison work.

Actions #1

Updated by Morton Jonuschat about 8 years ago

  • Target version changed from 7.6.3 to Candidate for patchlevel
Actions #2

Updated by Ivan Dharma Kartolo about 8 years ago

  • Status changed from New to Closed

I'm afraid this is core function and should be fixed there.

Actions #3

Updated by Ivan Dharma Kartolo about 8 years ago

sorry.. set the wrong relation to 72960 and this one get closed automatically :( I'll write a patch :)

Actions #4

Updated by Ivan Dharma Kartolo about 8 years ago

false alarm. bug is not in the QueryGenerator. This can be closed :)

Actions #5

Updated by Alexander Opitz about 8 years ago

  • Target version deleted (Candidate for patchlevel)
Actions

Also available in: Atom PDF