From 3470a5fa5d0a4a3474fca07b5de85ae76ae3dc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 23 Jul 2022 22:49:54 +0200 Subject: [PATCH] Don't show an error message in app:show-log when no logs are created yet. --- src/Command/ShowEventLogCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/ShowEventLogCommand.php b/src/Command/ShowEventLogCommand.php index e03afc0f..627855da 100644 --- a/src/Command/ShowEventLogCommand.php +++ b/src/Command/ShowEventLogCommand.php @@ -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;