diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 87078001c40..1790ab281e6 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -219,6 +219,7 @@ } elseif ( isset( $_REQUEST['ids'] ) ) { $post_ids = explode( ',', $_REQUEST['ids'] ); } + $post_ids = array_map( 'intval', (array) $post_ids ); $location = 'upload.php'; $referer = wp_get_referer(); @@ -241,7 +242,7 @@ if ( empty( $post_ids ) ) { break; } - foreach ( (array) $post_ids as $post_id ) { + foreach ( $post_ids as $post_id ) { if ( ! current_user_can( 'delete_post', $post_id ) ) { wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) ); } @@ -262,7 +263,7 @@ if ( empty( $post_ids ) ) { break; } - foreach ( (array) $post_ids as $post_id ) { + foreach ( $post_ids as $post_id ) { if ( ! current_user_can( 'delete_post', $post_id ) ) { wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) ); } @@ -277,7 +278,7 @@ if ( empty( $post_ids ) ) { break; } - foreach ( (array) $post_ids as $post_id_del ) { + foreach ( $post_ids as $post_id_del ) { if ( ! current_user_can( 'delete_post', $post_id_del ) ) { wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 9114c48e549..fa025de2708 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55182'; +$wp_version = '6.2-alpha-55183'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.