A free, self-hostable news aggregator…
Fix bug #2
Marien Fressinaud9d801981de02
diff --git a/app/controllers/indexController.php b/app/controllers/indexController.phpindex a4e81ab90..315e301ad 100755--- a/app/controllers/indexController.php+++ b/app/controllers/indexController.php@@ -40,10 +40,17 @@ class indexController extends ActionController {}// Gestion pagination- $page = Request::param ('page', 1);- $this->view->entryPaginator = new Paginator ($entries);- $this->view->entryPaginator->_nbItemsPerPage ($this->view->conf->postsPerPage ());- $this->view->entryPaginator->_currentPage ($page);+ try {+ $page = Request::param ('page', 1);+ $this->view->entryPaginator = new Paginator ($entries);+ $this->view->entryPaginator->_nbItemsPerPage ($this->view->conf->postsPerPage ());+ $this->view->entryPaginator->_currentPage ($page);+ } catch (CurrentPagePaginationException $e) {+ Error::error (+ 404,+ array ('error' => array ('La page que vous cherchez n\'existe pas'))+ );+ }$this->view->cat_aside = $catDAO->listCategories ();$this->view->nb_favorites = $entryDAO->countFavorites ();