Browse Source

correction bug pagination si page courante incorrecte

Marien Fressinaud 13 years ago
parent
commit
acc0c6f424
1 changed files with 8 additions and 1 deletions
  1. 8 1
      app/controllers/indexController.php

+ 8 - 1
app/controllers/indexController.php

@@ -56,7 +56,14 @@ class indexController extends ActionController {
 			$entries = $entryDAO->listEntries ($mode, $order);
 		}
 		
-		$this->view->entryPaginator = $entryDAO->getPaginator ($entries);
+		try {
+			$this->view->entryPaginator = $entryDAO->getPaginator ($entries);
+		} 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 ();