diff options
author | Tristan Darricau <github@nicofuma.fr> | 2016-12-29 18:18:53 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2016-12-29 18:18:53 +0100 |
commit | d5c063fd80de292673f0b8e4fe17e1082c9d1548 (patch) | |
tree | 92d14cee4c5a182b4cb2a53ad1b656466d6bb6d0 | |
parent | 442d21ace2b5d33e328917d7e7ac536709ba4d5c (diff) | |
parent | 97b834c3ef6051f11b0f74e60fe445976fb7d681 (diff) | |
download | forums-d5c063fd80de292673f0b8e4fe17e1082c9d1548.tar forums-d5c063fd80de292673f0b8e4fe17e1082c9d1548.tar.gz forums-d5c063fd80de292673f0b8e4fe17e1082c9d1548.tar.bz2 forums-d5c063fd80de292673f0b8e4fe17e1082c9d1548.tar.xz forums-d5c063fd80de292673f0b8e4fe17e1082c9d1548.zip |
Merge pull request #4591 from marc1706/ticket/14934
[ticket/14934] Use bare PHP functions for checking for tmp dir
-rw-r--r-- | phpBB/phpbb/di/proxy_instantiator.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/phpBB/phpbb/di/proxy_instantiator.php b/phpBB/phpbb/di/proxy_instantiator.php index a388e82c0e..70295a3dec 100644 --- a/phpBB/phpbb/di/proxy_instantiator.php +++ b/phpBB/phpbb/di/proxy_instantiator.php @@ -13,8 +13,6 @@ namespace phpbb\di; -use bantu\IniGetWrapper\IniGetWrapper; -use phpbb\filesystem\filesystem; use ProxyManager\Configuration; use ProxyManager\Factory\LazyLoadingValueHolderFactory; use ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy; @@ -45,11 +43,8 @@ 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(); - $filesystem = new filesystem(); $tmp_dir = (function_exists('sys_get_temp_dir')) ? sys_get_temp_dir() : ''; - if (empty($tmp_dir) || $ini_wrapper->getString('open_basedir') && - (!$filesystem->exists($tmp_dir) || !$filesystem->is_writable($tmp_dir))) + if (empty($tmp_dir) || !@file_exists($tmp_dir) || !@is_writable($tmp_dir)) { $config->setProxiesTargetDir($cache_dir); } |