From eae4b5e135c63c0a887b81ef7abed2e06a1e879f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 8 Jan 2024 12:13:31 +0100 Subject: [PATCH 1/1] Cleanup flash message --- Controller/DefaultController.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index 57703db..6333b45 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -144,13 +144,8 @@ class DefaultController extends AbstractController { return $this->redirectToRoute($request->get('_route'), ['sent' => 1]+$request->get('_route_params')); //Catch obvious transport exception } catch(TransportExceptionInterface $e) { - if ($message = $e->getMessage()) { - //Add error message mail unreachable - $form->get('mail')->addError(new FormError($this->translator->trans('Unable to contact: %mail%: %message%', ['%mail%' => $this->config['contact']['mail'], '%message%' => $this->translator->trans($message)]))); - } else { - //Add error message mail unreachable - $form->get('mail')->addError(new FormError($this->translator->trans('Unable to contact: %mail%', ['%mail%' => $this->config['contact']['mail']]))); - } + //Add error message mail unreachable + $form->get('mail')->addError(new FormError($this->translator->trans('Unable to reach account'))); } } //With logged user -- 2.41.1