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

View File

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