Silence PHP Warnings on is_writable calls. Can trigger open_basedir warnings on certain hosting environments. Props ocean90. Fixes #12866
git-svn-id: http://svn.automattic.com/wordpress/trunk@14427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2bbdd19973
commit
72f99c8a96
|
@ -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