From febf75f50de3a3cc578b50aacbcfefd03f0048d7 Mon Sep 17 00:00:00 2001 From: Donncha O Caoimh Date: Fri, 17 Sep 2004 10:51:23 +0000 Subject: [PATCH] When there's only one user on a blog edit.php displays an error. Fixed. http://wordpress.org/support/6/12915 git-svn-id: https://develop.svn.wordpress.org/trunk@1680 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 6814b51ccd..b9e94df8ab 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -10,7 +10,9 @@ get_currentuserinfo(); $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID"); if (1 < $user_level) { $editable = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_level <= '$user_level' AND ID != $user_ID"); - $editable = join($editable, ','); + if( is_array( $editable ) == false ) + $editable = array( "1" ); + $editable = join(',', $editable); $other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author IN ($editable) "); } else { $other_drafts = false;