|
|
@@ -33,8 +33,7 @@ class ErrorController extends AbstractController |
|
|
|
->from('nepasrepondre@laclic.fr') |
|
|
|
->to($mailDebug) |
|
|
|
->subject( |
|
|
|
'[' . $siteName . '] [ERREUR ' . $exception->getStatusCode() . '] ' . $exception->getMessage( |
|
|
|
) . '' |
|
|
|
'[' . $siteName . '] [ERREUR ' . $exception->getStatusCode() . '] ' . $exception->getMessage() . '' |
|
|
|
) |
|
|
|
->text(strip_tags($message)) |
|
|
|
->html($message); |
|
|
@@ -42,6 +41,13 @@ class ErrorController extends AbstractController |
|
|
|
$mailer->send($email); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($exception->getStatusCode() == 404) { |
|
|
|
return $this->render('bundles/TwigBundle/Exception/error404.html.twig', [ |
|
|
|
"code" => $exception->getStatusCode(), |
|
|
|
"message" => $exception->getMessage() |
|
|
|
]); |
|
|
|
} |
|
|
|
if (str_contains($this->getRequestStack()->getCurrentRequest(), "/admin")) { |
|
|
|
return $this->render('@LcSov/exception/error.html.twig', [ |
|
|
|
"code" => $exception->getStatusCode(), |