From ccc874514c9d9da2660fd07da134371f791acc16 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 16 May 2014 18:25:41 +0000 Subject: [PATCH] Eliminate use of `extract()` in `request_filesystem_credentials()`. The only property that doesn't need to be set to a variable is `$password`. See #22400. git-svn-id: https://develop.svn.wordpress.org/trunk@28456 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/file.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 9a310e97d6..bc40f3e62a 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -1084,11 +1084,13 @@ function request_filesystem_credentials($form_post, $type = '', $error = false, update_option('ftp_credentials', $stored_credentials); return $credentials; } - $hostname = ''; - $username = ''; - $connection_type = ''; - if ( !empty($credentials) ) - extract($credentials, EXTR_OVERWRITE); + $hostname = isset( $credentials['hostname'] ) ? $credentials['hostname'] : ''; + $username = isset( $credentials['username'] ) ? $credentials['username'] : ''; + $public_key = isset( $credentials['public_key'] ) ? $credentials['public_key'] : ''; + $private_key = isset( $credentials['private_key'] ) ? $credentials['private_key'] : ''; + $port = isset( $credentials['port'] ) ? $credentials['port'] : ''; + $connection_type = isset( $credentials[''] ) ? $credentials[''] : ''; + if ( $error ) { $error_string = __('ERROR: There was an error connecting to the server, Please verify the settings are correct.'); if ( is_wp_error($error) ) @@ -1178,7 +1180,8 @@ jQuery(function($){
-
size="40" />
size="40" /> +
size="40" /> +
size="40" />