diff options
Diffstat (limited to 'phpBB/phpbb/di')
-rw-r--r-- | phpBB/phpbb/di/proxy_instantiator.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/phpbb/di/proxy_instantiator.php b/phpBB/phpbb/di/proxy_instantiator.php index 1f51100493..47cc7b69c4 100644 --- a/phpBB/phpbb/di/proxy_instantiator.php +++ b/phpBB/phpbb/di/proxy_instantiator.php @@ -13,7 +13,8 @@ namespace phpbb\di; -use \bantu\IniGetWrapper\IniGetWrapper; +use bantu\IniGetWrapper\IniGetWrapper; +use phpbb\filesystem\filesystem; use ProxyManager\Configuration; use ProxyManager\Factory\LazyLoadingValueHolderFactory; use ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy; @@ -45,7 +46,10 @@ class proxy_instantiator implements InstantiatorInterface // Prevent trying to write to system temp dir in case of open_basedir // restrictions being in effect $ini_wrapper = new IniGetWrapper(); - if ($ini_wrapper->getString('open_basedir') || !file_exists(sys_get_temp_dir())) + $filesystem = new filesystem(); + $tmp_dir = sys_get_temp_dir(); + if ($ini_wrapper->getString('open_basedir') && + (!$filesystem->exists($tmp_dir) || !$filesystem->is_writable($tmp_dir))) { $config->setProxiesTargetDir($cache_dir); } |