From 579b4a8287c98fd206f8a1369f7291ee47125413 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 16 Jun 2025 22:25:59 +0700 Subject: [PATCH] [ticket/17527] Add Twig extensions existence check while registering PHPBB-17527 --- phpBB/phpbb/template/twig/twig.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index 66d3d78b0e..696866fa3d 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -99,7 +99,10 @@ class twig extends \phpbb\template\base foreach ($extensions as $extension) { - $this->twig->addExtension($extension); + if (!$this->twig->hasExtension(get_class($extension))) + { + $this->twig->addExtension($extension); + } } // Add admin namespace