From 54886235abc2614eef68e2a0b9a7d6bacd6cdcbf Mon Sep 17 00:00:00 2001 From: nbachiyski 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: http://svn.automattic.com/wordpress/trunk@16623 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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; }