Check upload_tmp_dir ini settings for a usable temporary path. Props Denis-de-Bernardy. fixes #6699
git-svn-id: http://svn.automattic.com/wordpress/trunk@12519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
adb37768c6
commit
b9dfd1fb4a
|
@ -155,6 +155,10 @@ function get_temp_dir() {
|
|||
|
||||
if ( function_exists('sys_get_temp_dir') )
|
||||
return trailingslashit(sys_get_temp_dir());
|
||||
|
||||
$temp = ini_get('upload_tmp_dir');
|
||||
if ( is_dir($temp) ) // always writable
|
||||
return trailingslashit($temp);
|
||||
|
||||
return '/tmp/';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue