From 5e1a3615bceaa913babe38a116b7ca1a40598f44 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 12 Mar 2019 11:16:55 +0100 Subject: [PATCH] removed one usage of Template vs TemplateWrapper --- src/Environment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Environment.php b/src/Environment.php index 968309946f0..ce894929734 100644 --- a/src/Environment.php +++ b/src/Environment.php @@ -532,7 +532,7 @@ public function loadClass($cls, $name, $index = null) * * @param string $template The template name * - * @return Template A template instance representing the given template name + * @return TemplateWrapper A template instance representing the given template name * * @throws LoaderError When the template cannot be found * @throws SyntaxError When an error occurred during compilation @@ -548,7 +548,7 @@ public function createTemplate($template) $this->setLoader($loader); try { - $template = $this->loadTemplate($name); + $template = new TemplateWrapper($this, $this->loadTemplate($name)); } catch (\Exception $e) { $this->setLoader($current);