Skip to content

Commit

Permalink
filterRange() in NetteDatabaseTableDataSource ignored the number zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel W committed Aug 19, 2024
1 parent 936e103 commit c811b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataSource/NetteDatabaseTableDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ protected function applyFilterRange(FilterRange $filter): void
$valueFrom = $conditions[$filter->getColumn()]['from'];
$valueTo = $conditions[$filter->getColumn()]['to'];

if ($valueFrom) {
if ($valueFrom !== '') {
$this->dataSource->where(sprintf('%s >= ?', $filter->getColumn()), $valueFrom);
}

if ($valueTo) {
if ($valueTo !== '') {
$this->dataSource->where(sprintf('%s <= ?', $filter->getColumn()), $valueTo);
}
}
Expand Down

0 comments on commit c811b9f

Please sign in to comment.