From 5a93fcf9528a139541a4cf67c94eaa56ee428f70 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 18 May 2017 13:09:29 +0300 Subject: [PATCH] Minor fix for adding custom page vars if page template file cannot be found --- system/src/Grav/Common/Twig/Twig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Twig/Twig.php b/system/src/Grav/Common/Twig/Twig.php index 2ba0b70d7..60f4e4770 100644 --- a/system/src/Grav/Common/Twig/Twig.php +++ b/system/src/Grav/Common/Twig/Twig.php @@ -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); }