Merge pull request #4110 from marc1706/ticket/14386

[ticket/14386] Fix for open_basedir restriction in effect with remote upload avatar
This commit is contained in:
Marc Alexander 2016-01-06 13:22:16 +01:00
commit 1a3f783807

View file

@ -200,8 +200,7 @@ class remote extends base
return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'EMPTY_REMOTE_DATA'); return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'EMPTY_REMOTE_DATA');
} }
$tmp_path = (!$this->php_ini->getBool('safe_mode')) ? false : $this->phpbb_root_path . 'cache'; $filename = tempnam(sys_get_temp_dir(), unique_id() . '-');
$filename = tempnam($tmp_path, unique_id() . '-');
if (!($fp = @fopen($filename, 'wb'))) if (!($fp = @fopen($filename, 'wb')))
{ {