From 62645d8cba2cf7b3902d18a58fa9a0d79369fa5e Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Sat, 7 Dec 2024 16:50:41 +0300 Subject: [PATCH] fix 500 on non existent page --- Web/Presenters/UserPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index 4c6bb0dd..6120bfec 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -34,7 +34,7 @@ final class UserPresenter extends OpenVKPresenter $this->template->_template = "User/deactivated.xml"; $this->template->user = $user; - } else if(!$user->canBeViewedBy($this->user->identity)) { + } else if(!is_null($user) && !$user->canBeViewedBy($this->user->identity)) { $this->template->_template = "User/private.xml"; $this->template->user = $user;