mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Check upload_tmp_dir ini settings for a usable temporary path. Props Denis-de-Bernardy. fixes #6699
git-svn-id: https://develop.svn.wordpress.org/trunk@12519 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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/';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user