DbConnection: Replicate the fix for #9211

This commit is contained in:
Johannes Meyer 2015-05-26 09:26:55 +02:00
parent f3124ffd59
commit 54354b17bf
1 changed files with 8 additions and 4 deletions

View File

@ -397,11 +397,15 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible
}
}
if ($level > 0) {
$where .= ' (' . implode($operator, $parts) . ') ';
} else {
$where .= implode($operator, $parts);
if (! empty($parts)) {
if ($level > 0) {
$where .= ' (' . implode($operator, $parts) . ') ';
} else {
$where .= implode($operator, $parts);
}
}
} else {
return ''; // Explicitly return the empty string due to the FilterNot case
}
} else {
$where .= $this->renderFilterExpression($filter);