1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/14807] Updates Twig

PHPBB3-14807
This commit is contained in:
Tristan Darricau
2016-10-02 19:24:45 +02:00
parent b28fe0a7fa
commit 7a5fbd0257
2 changed files with 18 additions and 9 deletions

View File

@@ -12,6 +12,7 @@
*/
namespace phpbb\template\twig;
use Twig_Loader_Filesystem;
/**
* Twig Template loader
@@ -100,6 +101,16 @@ class loader extends \Twig_Loader_Filesystem
return;
}
/**
* 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
*