We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aa4b115 + 0d82503 commit cd0e142Copy full SHA for cd0e142
cookbook/controller/error_pages.rst
@@ -50,6 +50,13 @@ end-user, create a new template located at
50
</body>
51
</html>
52
53
+.. caution::
54
+
55
+ You **must not** use ``is_granted`` in your error pages, because the
56
+ router runs before the firewall. If the router throws an exception (for
57
+ instance, when the route does not match), the error page is not behind a
58
+ firewall and ``app.user`` is not defined.
59
60
.. tip::
61
62
If you're not familiar with Twig, don't worry. Twig is a simple, powerful
0 commit comments