8000 minor #14820 Update access_denied_handler.rst (alihasana) · symfony/symfony-docs@f95a6c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit f95a6c0

Browse files
committed
minor #14820 Update access_denied_handler.rst (alihasana)
This PR was submitted for the 5.2 branch but it was merged into the 4.4 branch instead. Discussion ---------- Update access_denied_handler.rst getException is deprecated from symfony 4.4, as per event listerner docs we have to use getThrowable() Commits ------- 03611c5 Update access_denied_handler.rst
2 parents f50119c + 03611c5 commit f95a6c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/access_denied_handler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ configure a :ref:`kernel.exception listener <use-kernel-exception-event>`::
210210

211211
public function onKernelException(ExceptionEvent $event): void
212212
{
213-
$exception = $event->getException();
213+
$exception = $event->getThrowable();
214214
if (!$exception instanceof AccessDeniedException) {
215215
return;
216216
}

0 commit comments

Comments
 (0)
0