mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/14891] Don't rely on sys_get_temp_dir() being available
Or actually returning a path. It might also return an empty string or null. PHPBB3-14891
This commit is contained in:
parent
6a568719d0
commit
90b59bb547
1 changed files with 2 additions and 2 deletions
|
@ -47,8 +47,8 @@ class proxy_instantiator implements InstantiatorInterface
|
|||
// restrictions being in effect
|
||||
$ini_wrapper = new IniGetWrapper();
|
||||
$filesystem = new filesystem();
|
||||
$tmp_dir = sys_get_temp_dir();
|
||||
if ($ini_wrapper->getString('open_basedir') &&
|
||||
$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)))
|
||||
{
|
||||
$config->setProxiesTargetDir($cache_dir);
|
||||
|
|
Loading…
Add table
Reference in a new issue