diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 9a7e134..5181360 100644
a
|
b
|
$table = new WP_Posts_Table; |
15 | 15 | $table->check_permissions(); |
16 | 16 | |
17 | 17 | // Back-compat for viewing comments of an entry |
18 | | if ( $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) { |
| 18 | if ( isset($_GET['p']) && isset($_GET['attachment_id']) && isset($_GET['page_id']) && $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) { |
19 | 19 | wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) ); |
20 | 20 | exit; |
21 | 21 | } else { |
diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php
index e871ae5..49cfa5f 100644
a
|
b
|
function wp_restore_image($post_id) { |
421 | 421 | $file = get_attached_file($post_id); |
422 | 422 | $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); |
423 | 423 | $restored = false; |
424 | | $msg = ''; |
425 | 424 | |
426 | 425 | if ( !is_array($backup_sizes) ) { |
427 | 426 | $msg->error = __('Cannot load image metadata.'); |
… |
… |
function wp_restore_image($post_id) { |
492 | 491 | } |
493 | 492 | |
494 | 493 | function wp_save_image($post_id) { |
495 | | $return = ''; |
496 | 494 | $success = $delete = $scaled = $nocrop = false; |
497 | 495 | $post = get_post($post_id); |
498 | 496 | @ini_set('memory_limit', '256M'); |
diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php
index aaa20f3..e6a29e3 100644
a
|
b
|
function add_user() { |
55 | 55 | */ |
56 | 56 | function edit_user( $user_id = 0 ) { |
57 | 57 | global $wp_roles, $wpdb; |
| 58 | $user = new WP_User($user_id); |
58 | 59 | if ( $user_id != 0 ) { |
59 | 60 | $update = true; |
60 | 61 | $user->ID = (int) $user_id; |
… |
… |
function edit_user( $user_id = 0 ) { |
62 | 63 | $user->user_login = $wpdb->escape( $userdata->user_login ); |
63 | 64 | } else { |
64 | 65 | $update = false; |
65 | | $user = ''; |
66 | 66 | } |
67 | 67 | |
68 | 68 | if ( !$update && isset( $_POST['user_login'] ) ) |
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 28f501f..0e87875 100644
a
|
b
|
function add_query_arg() { |
1410 | 1410 | $qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string |
1411 | 1411 | if ( is_array( func_get_arg( 0 ) ) ) { |
1412 | 1412 | $kayvees = func_get_arg( 0 ); |
1413 | | $qs = array_merge( $qs, $kayvees ); |
| 1413 | $qs = array_merge( (array)$qs, (array)$kayvees ); |
1414 | 1414 | } else { |
1415 | 1415 | $qs[func_get_arg( 0 )] = func_get_arg( 1 ); |
1416 | 1416 | } |
… |
… |
function wp_parse_args( $args, $defaults = '' ) { |
2960 | 2960 | wp_parse_str( $args, $r ); |
2961 | 2961 | |
2962 | 2962 | if ( is_array( $defaults ) ) |
2963 | | return array_merge( $defaults, $r ); |
| 2963 | return array_merge( $defaults, (array)$r ); |
2964 | 2964 | return $r; |
2965 | 2965 | } |
2966 | 2966 | |
… |
… |
function get_file_data( $file, $default_headers, $context = '' ) { |
4179 | 4179 | foreach( $extra_headers as $key=>$value ) { |
4180 | 4180 | $extra_headers[$key] = $key; |
4181 | 4181 | } |
4182 | | $all_headers = array_merge($extra_headers, $default_headers); |
| 4182 | $all_headers = array_merge($extra_headers, (array)$default_headers); |
4183 | 4183 | } else { |
4184 | 4184 | $all_headers = $default_headers; |
4185 | 4185 | } |
diff --git a/wp-includes/registration.php b/wp-includes/registration.php
index 63f70e2..03876d1 100644
a
|
b
|
function validate_username( $username ) { |
103 | 103 | function wp_insert_user($userdata) { |
104 | 104 | global $wpdb; |
105 | 105 | |
106 | | extract($userdata, EXTR_SKIP); |
| 106 | extract($userdata); |
107 | 107 | |
108 | 108 | // Are we updating or creating? |
109 | 109 | if ( !empty($ID) ) { |