mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-20 23:51:28 +01:00
Merge pull request #4591 from marc1706/ticket/14934
[ticket/14934] Use bare PHP functions for checking for tmp dir
This commit is contained in:
commit
d5c063fd80
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user