Browse code

added some more information about unknown variable/attributes in the doc (closes #685)

Fabien Potencier authored on 05/04/2012 20:53:25
Showing 2 changed files
... ...
@@ -60,6 +60,8 @@ You can also load and render the template in one fell swoop::
60 60
 
61 61
     echo $twig->render('index.html', array('the' => 'variables', 'go' => 'here'));
62 62
 
63
+.. _environment_options:
64
+
63 65
 Environment Options
64 66
 -------------------
65 67
 
... ...
@@ -78,7 +78,9 @@ properties of a PHP object, or items of a PHP array), or the so-called
78 78
     variable but the print statement. If you access variables inside tags
79 79
     don't put the braces around.
80 80
 
81
-If a variable or attribute does not exist you will get back a ``null`` value.
81
+If a variable or attribute does not exist, you will get back a ``null`` value
82
+when the ``strict_variables`` option is set to ``false``, otherwise Twig will
83
+throw an error (see :ref:`environment options<environment_options>`).
82 84
 
83 85
 .. sidebar:: Implementation
84 86