From 866389a95a2e57bab0b52f8e40ed6ac7405f9e3e Mon Sep 17 00:00:00 2001 From: iIronside Date: Wed, 19 Oct 2022 13:01:04 +0300 Subject: [PATCH] quick fix profile --- common/services/ProfileService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/services/ProfileService.php b/common/services/ProfileService.php index fc47886..bd90b60 100644 --- a/common/services/ProfileService.php +++ b/common/services/ProfileService.php @@ -2,6 +2,7 @@ namespace common\services; +use common\classes\Debug; use common\models\Manager; use common\models\ManagerEmployee; use common\models\UserCard; @@ -15,11 +16,11 @@ class ProfileService /** * @throws ServerErrorHttpException */ - public static function getMainData($user_id): array + public static function getMainData($user_id)//: array { $userCard = UserCard::findOne(['id_user' => $user_id]); if (empty($userCard)) { - throw new ServerErrorHttpException(json_encode($userCard->errors)); + throw new ServerErrorHttpException(json_encode('Profile not found!')); } return array('fio' => $userCard->fio, 'photo' => $userCard->photo,