Don't show an error message in app:show-log when no logs are created yet.

This commit is contained in:
Jan Böhmer 2022-07-23 22:49:54 +02:00
parent b0d372d223
commit 3470a5fa5d

View file

@ -90,7 +90,7 @@ class ShowEventLogCommand extends Command
$total_count = $this->repo->count([]);
$max_page = (int) ceil($total_count / $limit);
if ($page > $max_page) {
if ($page > $max_page && $max_page > 0) {
$io->error("There is no page ${page}! The maximum page is ${max_page}.");
return 1;