From 0f459a355b6ebc9765385d1e50cac4f8ce2c1dab Mon Sep 17 00:00:00 2001 From: "aurian.jault" Date: Thu, 13 Jun 2024 09:07:36 +0200 Subject: [PATCH] Try catch removed --- src/Controller/ProfilController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Controller/ProfilController.php b/src/Controller/ProfilController.php index ee866b2..3d7d5c1 100644 --- a/src/Controller/ProfilController.php +++ b/src/Controller/ProfilController.php @@ -22,11 +22,7 @@ class ProfilController extends AbstractController #[Route(path: "/profil", name: "profil_perso", methods: ["GET"])] public function baseProfil(): Response { - try { - $this->denyAccessUnlessGranted('IS_AUTHENTICATED'); - } catch (\Exception $e) { - return $this->redirectToRoute('app_login'); - } + $this->denyAccessUnlessGranted('IS_AUTHENTICATED'); return $this->redirectToRoute('profil_show', ['id' => $this->getUser()->getId()]); } #[Route('/profil/{id}', name: 'profil_show', requirements: ['page' => '\d+'])]