Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 830ac84

Browse filesBrowse files
javiereguiluzxabbuh
authored andcommitted
Reworded the note about dump() not being available in prod
1 parent a216951 commit 830ac84
Copy full SHA for 830ac84

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎templating/debug.rst

Copy file name to clipboardExpand all lines: templating/debug.rst
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function:
4646
</a>
4747
{% endfor %}
4848

49-
The variables will only be dumped if Twig's ``debug`` setting (in ``config.yml``)
50-
is ``true``. By default this means that the variables will be dumped in the
51-
``dev`` environment but not the ``prod`` environment.
49+
By design, the ``dump()`` function is only available if the ``kernel.debug``
50+
setting (in ``config.yml``) is ``true``, to avoid leaking sensitive information
51+
in production. In fact, trying to use the ``dump()`` function when ``kernel.debug``
52+
is ``false`` (for example in the ``prod`` environment) will result in an
53+
application error.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.