aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/twig/loader.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/template/twig/loader.php')
-rw-r--r--phpBB/phpbb/template/twig/loader.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php
index 8b12188a77..b2261dd8cd 100644
--- a/phpBB/phpbb/template/twig/loader.php
+++ b/phpBB/phpbb/template/twig/loader.php
@@ -12,6 +12,7 @@
*/
namespace phpbb\template\twig;
+use Twig_Loader_Filesystem;
/**
* Twig Template loader
@@ -101,6 +102,16 @@ class loader extends \Twig_Loader_Filesystem
}
/**
+ * Adds a realpath call to fix a BC break in Twig 1.26 (https://github.com/twigphp/Twig/issues/2145)
+ *
+ * {@inheritdoc}
+ */
+ public function addPath($path, $namespace = self::MAIN_NAMESPACE)
+ {
+ return parent::addPath($this->filesystem->realpath($path), $namespace);
+ }
+
+ /**
* Find the template
*
* Override for Twig_Loader_Filesystem::findTemplate to add support