From ed6f9942b41a15a41e66965545763696b5802050 Mon Sep 17 00:00:00 2001 From: blackcoder87 Date: Thu, 14 Nov 2024 16:09:53 +0100 Subject: [PATCH] User module: Fix "Argument must be of type int, string given" (#1099) --- application/modules/user/controllers/Profil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/modules/user/controllers/Profil.php b/application/modules/user/controllers/Profil.php index 53767ae4d..c3d0bf50f 100644 --- a/application/modules/user/controllers/Profil.php +++ b/application/modules/user/controllers/Profil.php @@ -27,7 +27,7 @@ public function indexAction() $profileFieldsTranslationMapper = new ProfileFieldsTranslationMapper(); $friendsMapper = new FriendsMapper(); - $profil = ($this->getRequest()->getParam('user')) ? $userMapper->getUserById($this->getRequest()->getParam('user')) : null; + $profil = ($this->getRequest()->getParam('user') && is_numeric($this->getRequest()->getParam('user'))) ? $userMapper->getUserById($this->getRequest()->getParam('user')) : null; if ($profil) { $profileIconFields = $profileFieldsMapper->getProfileFields(['type' => 2]);