Bug #27134
closedwrong where clause compilation with multiple FIELD_IN_SET query parts
0%
Description
It seems there is a bug in class t3lib/class.t3lib_sqlparser.php in function compileWhereClause. I need to concatenate multiple FIELD_IN_SET query parts in my extbase extension so i did;
$query->matching(
$query->logicalOr(
$query->contains('usergroup',4),
$query->equals('uid',2),
$query->equals('uid',1),
$query->contains('usergroup',5)
)
);
this will produce a SELECT statement where all query parts before the last "contains" part ($query->contains('usergroup',5)) get lost. So the resulting SELECT statement of the above query is;
(FIND_IN_SET(5, fe_users.usergroup)) AND (fe_users.tx_extbase_type = '0') AND fe_users.deleted = 0 AND fe_users.disable = 0 AND fe_users.starttime <= 1306742460 AND (fe_users.endtime = 0 OR fe_users.endtime > 1306742460)
I attached the $clauseArray so you can reproduce easily this behavior by calling the function compileWhereClause in t3lib/class.t3lib_sqlparser.php directly.
Files