1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/17527] Add Twig extensions existence check while registering

PHPBB-17527
This commit is contained in:
rxu
2025-06-16 22:25:59 +07:00
parent 2f43c1facd
commit 579b4a8287

View File

@@ -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/'))