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:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user