Minor fix for adding custom page vars if page template file cannot be found

This commit is contained in:
Matias Griese
2017-05-18 13:09:29 +03:00
parent f3cecd8bdd
commit 5a93fcf952

View File

@@ -347,7 +347,7 @@ class Twig
if ($ext != '.html' . TWIG_EXT) {
try {
$page->templateFormat('html');
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $twig_vars);
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $vars + $twig_vars);
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($error_msg, 400, $e);
}