mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge branch '3.3.x'
This commit is contained in:
commit
ea0aa7b54a
2 changed files with 9 additions and 1 deletions
|
@ -113,6 +113,14 @@ $phpbb_class_loader_ext->register();
|
|||
try
|
||||
{
|
||||
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
|
||||
|
||||
// Check that cache directory is writable before trying to build container
|
||||
$cache_dir = $phpbb_container_builder->get_cache_dir();
|
||||
if (file_exists($cache_dir) && !is_writable($phpbb_container_builder->get_cache_dir()))
|
||||
{
|
||||
die('Unable to write to the cache directory path "' . $cache_dir . '". Ensure that the web server user can write to the cache folder.');
|
||||
}
|
||||
|
||||
$phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file)->get_container();
|
||||
}
|
||||
catch (InvalidArgumentException $e)
|
||||
|
|
|
@ -423,7 +423,7 @@ class container_builder
|
|||
*
|
||||
* @return string Path to the cache directory.
|
||||
*/
|
||||
protected function get_cache_dir()
|
||||
public function get_cache_dir()
|
||||
{
|
||||
return $this->cache_dir ?: $this->phpbb_root_path . 'cache/' . $this->get_environment() . '/';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue