Skip to content

Commit

Permalink
Handle when filter limit is '0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Sep 9, 2023
1 parent b1cdf99 commit a13c9c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/ajax/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function queryRequest($filter, $search, $advsearch, $sort, $offset, $order, $lim
CASE WHEN E.EndDateTime IS NULL THEN (SELECT UNIX_TIMESTAMP(NOW())) ELSE UNIX_TIMESTAMP(EndDateTime) END AS EndTimeSecs,
M.Name AS Monitor';
$sql = 'SELECT ' .$col_str. ' FROM `Events` AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id'.$where.($sort?' ORDER BY '.$sort.' '.$order:'');
if ($filter->limit() and !count($filter->post_sql_conditions())) {
if (int($filter->limit()) and !count($filter->post_sql_conditions())) {
$sql .= ' LIMIT '.$filter->limit();
}

Expand Down

0 comments on commit a13c9c0

Please sign in to comment.