Skip to content

Commit 36d11f3

Browse files
committed
Fix a bug in < phpBB 3.2.0-b2 with cache_dir parameter
1 parent 5f3020d commit 36d11f3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

helper/packager.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ public function create_extension($data)
128128
}
129129
else
130130
{
131+
// Work-around for bug in phpBB 3.2.0-dev-3.2.0-b2
132+
$cache_dir = ($this->phpbb_container->hasParameter('core.cache_dir')) ? $this->phpbb_container->getParameter('core.cache_dir') : $this->phpbb_container->getParameter('core.root_path') . 'cache/';
133+
131134
$template_engine = new twig(
132135
$this->phpbb_container->get('path_helper'),
133136
$config,
@@ -137,13 +140,13 @@ public function create_extension($data)
137140
$this->phpbb_container->get('filesystem'),
138141
$this->phpbb_container->get('path_helper'),
139142
$this->phpbb_container,
140-
$this->phpbb_container->getParameter('core.cache_dir'),
143+
$cache_dir,
141144
$this->phpbb_container->get('ext.manager'),
142145
new loader(
143146
new \phpbb\filesystem\filesystem()
144147
)
145148
),
146-
$this->phpbb_container->getParameter('core.cache_dir'),
149+
$cache_dir,
147150
$this->phpbb_container->get('user')
148151
);
149152
}

0 commit comments

Comments
 (0)