mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
fixed inherited templates when an empty body
This commit is contained in:
+3
-1
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user