From 8afc638171f5ffdedaa76d606c03eecc95c6bd6c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 1 Nov 2023 16:23:23 +0100 Subject: [PATCH] [ticket/17207] Lazily call get_web_root_path() in twig environment PHPBB3-17207 --- phpBB/phpbb/template/twig/environment.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php index 27426606aa7..4671e134d2c 100644 --- a/phpBB/phpbb/template/twig/environment.php +++ b/phpBB/phpbb/template/twig/environment.php @@ -69,7 +69,6 @@ public function __construct(\phpbb\config\config $phpbb_config, \phpbb\filesyste $this->phpbb_dispatcher = $phpbb_dispatcher; $this->phpbb_root_path = $this->phpbb_path_helper->get_phpbb_root_path(); - $this->web_root_path = $this->phpbb_path_helper->get_web_root_path(); $this->assets_bag = new assets_bag(); @@ -132,7 +131,7 @@ public function get_filesystem() */ public function get_web_root_path() { - return $this->web_root_path; + return $this->web_root_path ?? $this->web_root_path = $this->phpbb_path_helper->get_web_root_path(); } /**