Skip to content

Commit 5cd9f78

Browse files
committed
Prevent infinite loop on log_digest page when no log entries are found
1 parent 339dc27 commit 5cd9f78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

get-log-digest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
$end_log_id = $start_log_id - LOG_WINDOW_SIZE;
3737
}
3838

39+
// Prevent potential infinite loop if no log entries are found in provided time window
40+
if (is_null($start_log_id) || is_null($min_log_id)) {
41+
echo "No activity found in the provided time window, please expand your search.";
42+
exit();
43+
}
44+
3945
$message_subtrings = $digestLog::createLikeStatements();
4046

4147
// NOTE: probably don't need EM id or project_id

0 commit comments

Comments
 (0)