fixed inherited templates when an empty body

This commit is contained in:
Fabien Potencier
2011-07-26 17:32:54 +02:00
parent 6e97162de4
commit 74d2f76c23
+3 -1
View File
@@ -81,7 +81,9 @@ class Twig_Parser implements Twig_ParserInterface
$body = $this->subparse(null);
if (null !== $this->parent) {
$body = $this->filterBodyNodes($body);
if (null === $body = $this->filterBodyNodes($body)) {
$body = new Twig_Node();
}
}
} catch (Twig_Error_Syntax $e) {
if (null === $e->getTemplateFile()) {