* 1.2.0
+ * fixed algorithm that determines if a template using inheritance is valid (no output between block definitions)
* added better support for encoding problems when escaping a string (available as of PHP 5.4)
* added a way to ignore a missing template when using the "include" tag ({% include "foo" ignore missing %})
* added support for an array of templates to the "include" and "extends" tags ({% include ['foo', 'bar'] %})
throw new Twig_Error_Syntax('A template that extends another one cannot have a body.', $node->getLine(), $this->stream->getFilename());
}
+ // bypass "set" nodes as they "capture" the output
+ if ($node instanceof Twig_Node_Set) {
+ return $node;
+ }
+
if ($node instanceof Twig_NodeOutputInterface) {
- return null;
+ return;
}
foreach ($node as $k => $n) {
$input = new Twig_Node(array(new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 0))),
$input,
),
+ array(
+ $input = new Twig_Node(array(new Twig_Node_Set(true, new Twig_Node(), new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 0))))), 0))),
+ $input,
+ ),
);
}