Skip to content

Commit 44c980b

Browse files
committed
only include a WHERE statement into the query when at least one filter part is present
1 parent 00a12b6 commit 44c980b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dba/AbstractModelFactory.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,9 @@ private function applyFilters(&$vals, $filters) {
746746
array_push($vals, $v);
747747
}
748748
}
749+
if (sizeof($parts) == 0) {
750+
return "";
751+
}
749752
return " WHERE " . implode(" AND ", $parts);
750753
}
751754

0 commit comments

Comments
 (0)