diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php index 5843cc0762c..7def1751467 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(); } /**