diff --git a/src/App/components/template/Pagination.php b/src/App/components/template/Pagination.php index 16eac46dfce67096059b674277d87ef649f4c1a0..1ab4e9bca9f84ec33802fe0e65b4fd83744e9091 100644 --- a/src/App/components/template/Pagination.php +++ b/src/App/components/template/Pagination.php @@ -2,7 +2,7 @@ function pagination_template($controllerName, $data, $currentPage, $dataLimit, $function = null) { $dataCount = count($data); - $pageCount = ceil($dataCount / $dataLimit); + $pageCount = max(1, ceil($dataCount / $dataLimit)); function makeButton($controllerName, $page, $text, $disabled, $function) { $disable = $disabled ? 'disabled' : '';