mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #6559 from marc1706/ticket/17207
[ticket/17207] Lazily call get_web_root_path() in twig environment
This commit is contained in:
commit
d4178511a2
1 changed files with 1 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue