* added a bunch of phpdoc
* added a sandbox tag in the sandbox extension
* changed the date filter to support any date format supported by DateTime
- * added strict_variable setting to throw an exception when an invalid variable is used in a template (disabled by default when debug is false)
+ * added strict_variable setting to throw an exception when an invalid variable is used in a template (disabled by default)
* added the lexer, parser, and compiler as arguments to the Twig_Environment constructor
* changed the cache option to only accepts an explicit path to a cache directory or false
* added a way to add token parsers, filters, and visitors without creating an extension
* `strict_variables` (new in Twig 0.9.7): If set to `false`, Twig will
silently ignore invalid variables (variables and or attributes/methods that
do not exist) and replace them with a `null` value. When set to `true`,
- Twig throws an exception instead. If you don't provide a value for the
- `strict_variables` option, it will be determined automatically based on the
- `debug` value.
+ Twig throws an exception instead (default to `false`).
>**CAUTION**
>Before Twig 0.9.3, the `cache` and `auto_reload` options did not exist. They
* determined automatically base on the debug value.
*
* * strict_variables: Whether to ignore invalid variables in templates
- * (default to the value of debug).
+ * (default to false).
*
* @param Twig_LoaderInterface $loader A Twig_LoaderInterface instance
* @param array $options An array of options
$this->baseTemplateClass = isset($options['base_template_class']) ? $options['base_template_class'] : 'Twig_Template';
$this->autoReload = isset($options['auto_reload']) ? (bool) $options['auto_reload'] : $this->debug;
$this->extensions = array('core' => new Twig_Extension_Core());
- $this->strictVariables = isset($options['strict_variables']) ? (bool) $options['strict_variables'] : $this->debug;
+ $this->strictVariables = isset($options['strict_variables']) ? (bool) $options['strict_variables'] : false;
$this->runtimeInitialized = false;
if (isset($options['cache']) && $options['cache']) {
$this->setCache($options['cache']);