diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 9a7e134..5181360 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -15,7 +15,7 @@ $table = new WP_Posts_Table;
 $table->check_permissions();
 
 // Back-compat for viewing comments of an entry
-if ( $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) {
+if ( isset($_GET['p']) && isset($_GET['attachment_id']) && isset($_GET['page_id']) && $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) {
 	wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) );
 	exit;
 } else {
diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php
index e871ae5..49cfa5f 100644
--- a/wp-admin/includes/image-edit.php
+++ b/wp-admin/includes/image-edit.php
@@ -421,7 +421,6 @@ function wp_restore_image($post_id) {
 	$file = get_attached_file($post_id);
 	$backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
 	$restored = false;
-	$msg = '';
 
 	if ( !is_array($backup_sizes) ) {
 		$msg->error = __('Cannot load image metadata.');
@@ -492,7 +491,6 @@ function wp_restore_image($post_id) {
 }
 
 function wp_save_image($post_id) {
-	$return = '';
 	$success = $delete = $scaled = $nocrop = false;
 	$post = get_post($post_id);
 	@ini_set('memory_limit', '256M');
diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php
index aaa20f3..e6a29e3 100644
--- a/wp-admin/includes/user.php
+++ b/wp-admin/includes/user.php
@@ -55,6 +55,7 @@ function add_user() {
  */
 function edit_user( $user_id = 0 ) {
 	global $wp_roles, $wpdb;
+	$user = new WP_User($user_id);
 	if ( $user_id != 0 ) {
 		$update = true;
 		$user->ID = (int) $user_id;
@@ -62,7 +63,6 @@ function edit_user( $user_id = 0 ) {
 		$user->user_login = $wpdb->escape( $userdata->user_login );
 	} else {
 		$update = false;
-		$user = '';
 	}
 
 	if ( !$update && isset( $_POST['user_login'] ) )
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 28f501f..0e87875 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -1410,7 +1410,7 @@ function add_query_arg() {
 	$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string
 	if ( is_array( func_get_arg( 0 ) ) ) {
 		$kayvees = func_get_arg( 0 );
-		$qs = array_merge( $qs, $kayvees );
+		$qs = array_merge( (array)$qs, (array)$kayvees );
 	} else {
 		$qs[func_get_arg( 0 )] = func_get_arg( 1 );
 	}
@@ -2960,7 +2960,7 @@ function wp_parse_args( $args, $defaults = '' ) {
 		wp_parse_str( $args, $r );
 
 	if ( is_array( $defaults ) )
-		return array_merge( $defaults, $r );
+		return array_merge( $defaults, (array)$r );
 	return $r;
 }
 
@@ -4179,7 +4179,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
 		foreach( $extra_headers as $key=>$value ) {
 			$extra_headers[$key] = $key;
 		}
-		$all_headers = array_merge($extra_headers, $default_headers);
+		$all_headers = array_merge($extra_headers, (array)$default_headers);
 	} else {
 		$all_headers = $default_headers;
 	}
diff --git a/wp-includes/registration.php b/wp-includes/registration.php
index 63f70e2..03876d1 100644
--- a/wp-includes/registration.php
+++ b/wp-includes/registration.php
@@ -103,7 +103,7 @@ function validate_username( $username ) {
 function wp_insert_user($userdata) {
 	global $wpdb;
 
-	extract($userdata, EXTR_SKIP);
+	extract($userdata);
 
 	// Are we updating or creating?
 	if ( !empty($ID) ) {
