From cec199aa57131dc05e064722c9abaab9b9687c6d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 26 May 2011 05:41:34 +0000 Subject: [PATCH] Don't use array calling for post_status in wp_edit_attachments_query() to prevent any use of the deprecated query_string filter (as in, don't use it) from tanking the page. see #17556, #17559. for 3.1. git-svn-id: https://develop.svn.wordpress.org/trunk@18053 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 18ab7e21e7..bd67fcd9ed 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -997,9 +997,9 @@ function wp_edit_attachments_query( $q = false ) { $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0; $q['post_type'] = 'attachment'; $post_type = get_post_type_object( 'attachment' ); - $states = array( 'inherit' ); + $states = 'inherit'; if ( current_user_can( $post_type->cap->read_private_posts ) ) - $states[] = 'private'; + $states .= ',private'; $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states; $media_per_page = (int) get_user_option( 'upload_per_page' );