From d9b7b47a37c79b7f1825864f7027e04c8ee14bd0 Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Mon, 29 Jun 2020 19:51:59 +0000 Subject: [PATCH] Fix pagination in albums --- Web/Presenters/PhotosPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Presenters/PhotosPresenter.php b/Web/Presenters/PhotosPresenter.php index a09362c8..9aa821b5 100644 --- a/Web/Presenters/PhotosPresenter.php +++ b/Web/Presenters/PhotosPresenter.php @@ -124,7 +124,7 @@ final class PhotosPresenter extends OpenVKPresenter $this->notFound(); $this->template->album = $album; - $this->template->photos = iterator_to_array($album->getPhotos($this->queryParam("page") ?? 1)); + $this->template->photos = iterator_to_array( $album->getPhotos( (int) ($this->queryParam("p") ?? 1) ) ); $this->template->paginatorConf = (object) [ "count" => $album->getPhotosCount(), "page" => $this->queryParam("p") ?? 1,