mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #6831 from rxu/ticket/17527
[ticket/17527] Add Twig extensions existence check while registering
This commit is contained in:
commit
9219c03b36
1 changed files with 4 additions and 1 deletions
|
@ -98,9 +98,12 @@ class twig extends \phpbb\template\base
|
|||
$this->twig = $twig_environment;
|
||||
|
||||
foreach ($extensions as $extension)
|
||||
{
|
||||
if (!$this->twig->hasExtension(get_class($extension)))
|
||||
{
|
||||
$this->twig->addExtension($extension);
|
||||
}
|
||||
}
|
||||
|
||||
// Add admin namespace
|
||||
if ($this->path_helper->get_adm_relative_path() !== null && is_dir($this->phpbb_root_path . $this->path_helper->get_adm_relative_path() . 'style/'))
|
||||
|
|
Loading…
Add table
Reference in a new issue