Permalink
Browse files

Silence a PHP Warning in Safe Mode from get_temp_dir(). Props ocean90…

…. Fixes #20778

git-svn-id: http://core.svn.wordpress.org/trunk@22082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent b821458 commit 19c7ca77295f4ddeb5a8dd6ee991bf1cb57d4b03 @dd32 dd32 committed Sep 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 );
-}
+}

0 comments on commit 19c7ca7

Please sign in to comment.