From: Fabien Potencier Date: Thu, 5 Apr 2012 20:53:25 +0000 (+0200) Subject: added some more information about unknown variable/attributes in the doc (closes... X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=fbacbe60ada8c7b1978474da19391fda1ffedcc5;p=web%2Fkonrad%2Ftwig.git added some more information about unknown variable/attributes in the doc (closes #685) --- diff --git a/doc/api.rst b/doc/api.rst index 864585e..445b8a7 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -60,6 +60,8 @@ You can also load and render the template in one fell swoop:: echo $twig->render('index.html', array('the' => 'variables', 'go' => 'here')); +.. _environment_options: + Environment Options ------------------- diff --git a/doc/templates.rst b/doc/templates.rst index bcd0ead..8813c6d 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -78,7 +78,9 @@ properties of a PHP object, or items of a PHP array), or the so-called variable but the print statement. If you access variables inside tags don't put the braces around. -If a variable or attribute does not exist you will get back a ``null`` value. +If a variable or attribute does not exist, you will get back a ``null`` value +when the ``strict_variables`` option is set to ``false``, otherwise Twig will +throw an error (see :ref:`environment options`). .. sidebar:: Implementation