From fdb920ee50efe2c5cf64ca2dec936ec28ab2ee6c Mon Sep 17 00:00:00 2001 From: mathContao Date: Sat, 23 Jul 2022 23:26:52 +0200 Subject: [PATCH] page < 0 is impossible now --- app/Controllers/indexController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 70b8824c3..9920c677a 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -371,7 +371,10 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { $logs = FreshRSS_LogDAO::lines(); //TODO: ask only the necessary lines //gestion pagination - $page = Minz_Request::param('page', 1); + $page = intval(Minz_Request::param('page', 1)); + if ($page < 1) { + $page = 1; + } $this->view->logsPaginator = new Minz_Paginator($logs); $this->view->logsPaginator->_nbItemsPerPage(50); $this->view->logsPaginator->_currentPage($page);