Silence PHP Warnings on is_writable calls. Can trigger open_basedir warnings on certain hosting environments. Props ocean90. Fixes #12866
git-svn-id: https://develop.svn.wordpress.org/trunk@14427 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
52cdae0385
commit
1fc13e3b48
@ -157,17 +157,17 @@ function get_temp_dir() {
|
||||
return trailingslashit($temp);
|
||||
|
||||
$temp = WP_CONTENT_DIR . '/';
|
||||
if ( is_dir($temp) && is_writable($temp) )
|
||||
if ( is_dir($temp) && @is_writable($temp) )
|
||||
return $temp;
|
||||
|
||||
if ( function_exists('sys_get_temp_dir') ) {
|
||||
$temp = sys_get_temp_dir();
|
||||
if ( is_writable($temp) )
|
||||
if ( @is_writable($temp) )
|
||||
return trailingslashit($temp);
|
||||
}
|
||||
|
||||
$temp = ini_get('upload_tmp_dir');
|
||||
if ( is_dir($temp) && is_writable($temp) )
|
||||
if ( is_dir($temp) && @is_writable($temp) )
|
||||
return trailingslashit($temp);
|
||||
|
||||
$temp = '/tmp/';
|
||||
|
Loading…
Reference in New Issue
Block a user