1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/17207] Lazily call get_web_root_path() in twig environment

PHPBB3-17207
This commit is contained in:
Marc Alexander
2023-11-01 16:23:23 +01:00
parent 37039f95d2
commit 8afc638171

View File

@@ -69,7 +69,6 @@ class environment extends \Twig\Environment
$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 @@ class environment extends \Twig\Environment
*/
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();
}
/**