From 693fccb99c91a24ddfa8be596531af3eece58a1b Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sat, 29 Sep 2012 01:22:25 +0000 Subject: [PATCH] Silence a PHP Warning in Safe Mode from get_temp_dir(). Props ocean90. Fixes #20778 git-svn-id: https://develop.svn.wordpress.org/trunk@22082 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 4e47f7484b..98f52bcf9d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1391,7 +1391,7 @@ function get_temp_dir() { if ( function_exists('sys_get_temp_dir') ) { $temp = sys_get_temp_dir(); - if ( is_dir( $temp ) && ( $is_win ? win_is_writable( $temp ) : @is_writable( $temp ) ) ) { + if ( @is_dir( $temp ) && ( $is_win ? win_is_writable( $temp ) : @is_writable( $temp ) ) ) { return trailingslashit( $temp ); } } @@ -3758,4 +3758,4 @@ function _device_can_upload() { */ function wp_checkdate( $month, $day, $year, $source_date ) { return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date ); -} \ No newline at end of file +}