From 674e613e303523c543a7577a8c0df8d14f1d575a Mon Sep 17 00:00:00 2001 From: Celestora Date: Tue, 16 Nov 2021 11:56:27 +0200 Subject: [PATCH] Fix routing bug in absolute photo URLs --- Web/Presenters/PhotosPresenter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/Presenters/PhotosPresenter.php b/Web/Presenters/PhotosPresenter.php index cefe69ac..24fd7829 100644 --- a/Web/Presenters/PhotosPresenter.php +++ b/Web/Presenters/PhotosPresenter.php @@ -159,9 +159,9 @@ final class PhotosPresenter extends OpenVKPresenter $this->template->comments = iterator_to_array($photo->getComments($this->template->cPage)); } - function renderAbsolutePhoto(string $id): void + function renderAbsolutePhoto($id): void { - $id = (int) base_convert($id, 32, 10); + $id = (int) base_convert((string) $id, 32, 10); $photo = $this->photos->get($id); if(!$photo || $photo->isDeleted()) $this->notFound();