Fix filter expression handling when lowering to achieve case-insensitivity

fixes #8435
This commit is contained in:
Johannes Meyer 2015-02-16 13:05:24 +01:00
parent 1c494b2b64
commit e588ea2714
1 changed files with 6 additions and 1 deletions

View File

@ -290,7 +290,12 @@ abstract class IdoQuery extends DbQuery
&& strpos($filter->getColumn(), 'LOWER') !== 0 && strpos($filter->getColumn(), 'LOWER') !== 0
) { ) {
$filter->setColumn('LOWER(' . $filter->getColumn() . ')'); $filter->setColumn('LOWER(' . $filter->getColumn() . ')');
$filter->setExpression(strtolower($filter->getExpression())); $expression = $filter->getExpression();
if (is_array($expression)) {
$filter->setExpression(array_map('strtolower', $expression));
} else {
$filter->setExpression(strtolower($expression));
}
} }
} else { } else {
foreach ($filter->filters() as $chainedFilter) { foreach ($filter->filters() as $chainedFilter) {