diff --git a/lib/project.php b/lib/project.php index e8ca80d..feec26a 100644 --- a/lib/project.php +++ b/lib/project.php @@ -72,7 +72,7 @@ function getProjectNumberOfPages($maxPerPage) $result = $query->fetch(); - return ceil($result['total'] / $maxPerPage); + return (int) ceil($result['total'] / $maxPerPage); } /** @@ -88,6 +88,13 @@ function getCommentsByProject($id) // Prévoir une fonction pour enregistrer un commentaire +/** + * Génère et retourne une pagination + * + * @param int $page La page courrante + * @param int $numberOfPages Le nombre de pages + * @return array Les pages + */ function getProjectsPager($page, $numberOfPages) { $pages = [];