mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Don't show an error message in app:show-log when no logs are created yet.
This commit is contained in:
parent
b0d372d223
commit
3470a5fa5d
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ class ShowEventLogCommand extends Command
|
||||||
$total_count = $this->repo->count([]);
|
$total_count = $this->repo->count([]);
|
||||||
$max_page = (int) ceil($total_count / $limit);
|
$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}.");
|
$io->error("There is no page ${page}! The maximum page is ${max_page}.");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue