From d6c68d045f0144c4094985ae7c7719545c18cf25 Mon Sep 17 00:00:00 2001 From: johnboy-leeds Date: Mon, 24 Oct 2016 08:27:16 +0100 Subject: [PATCH] Replace usage of deprecated Twig_Error::getTemplateFile() with getTemplateName() --- src/Engine/Twig.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Engine/Twig.php b/src/Engine/Twig.php index dfdfc347..39ca9987 100644 --- a/src/Engine/Twig.php +++ b/src/Engine/Twig.php @@ -105,15 +105,15 @@ public function get($path, array $data = []) */ protected function handleTwigError(Twig_Error $ex) { - $templateFile = $ex->getTemplateFile(); + $templateName = $ex->getTemplateName(); $templateLine = $ex->getTemplateLine(); - if ($templateFile && file_exists($templateFile)) { - $file = $templateFile; - } elseif ($templateFile) { + if ($templateName && file_exists($templateName)) { + $file = $templateName; + } elseif ($templateName) { // Attempt to locate full path to file try { - $file = $this->loader->findTemplate($templateFile); + $file = $this->loader->findTemplate($templateName); } catch (Twig_Error_Loader $exception) { // Unable to load template }