From 757aeb21218ecf164ef263b3e7d450f4f2e7d318 Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Tue, 30 Nov 2010 19:57:39 +0000 Subject: [PATCH] Rename the $rm variable so that the logic in win_is_writable() makes more sense git-svn-id: https://develop.svn.wordpress.org/trunk@16623 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/misc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 16ef654639..9f760b5abe 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -567,7 +567,7 @@ function saveDomDocument($doc, $filename) { * * @since 2.8.0 * - * @param object $path + * @param string $path * @return bool */ function win_is_writable( $path ) { @@ -582,12 +582,12 @@ function win_is_writable( $path ) { else if ( is_dir( $path ) ) return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' ); // check tmp file for read/write capabilities - $rm = file_exists( $path ); + $should_delete_tmp_file = !file_exists( $path ); $f = @fopen( $path, 'a' ); if ( $f === false ) return false; fclose( $f ); - if ( ! $rm ) + if ( $should_delete_tmp_file ) unlink( $path ); return true; }