Fix pagination in albums

This commit is contained in:
Alma Armas 2020-06-29 19:51:59 +00:00
parent 6cb36548fc
commit d9b7b47a37

View file

@ -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,