From 6e159bb671d80220054ebdd651fd4426b7cb61d2 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 11 Jun 2014 19:40:27 +0000 Subject: [PATCH] Don't use variable variables in `setup-config.php` (Step 2). See #27881. git-svn-id: https://develop.svn.wordpress.org/trunk@28744 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/setup-config.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index 2b5b7f89fb..c3a6f63988 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -166,8 +166,11 @@ switch($step) { break; case 2: - foreach ( array( 'dbname', 'uname', 'pwd', 'dbhost', 'prefix' ) as $key ) - $$key = trim( wp_unslash( $_POST[ $key ] ) ); + $dbname = trim( wp_unslash( $_POST[ 'dbname' ] ) ); + $uname = trim( wp_unslash( $_POST[ 'uname' ] ) ); + $pwd = trim( wp_unslash( $_POST[ 'pwd' ] ) ); + $dbhost = trim( wp_unslash( $_POST[ 'dbhost' ] ) ); + $prefix = trim( wp_unslash( $_POST[ 'prefix' ] ) ); $tryagain_link = '

' . __( 'Try again' ) . '';