From 47800719182f1c353fa44673490ba3a8497ae5e4 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 19 Nov 2006 08:06:03 +0000 Subject: [PATCH] Handle empty authors list. Props MichaelH. fixes #2384 git-svn-id: http://svn.automattic.com/wordpress/trunk@4497 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/author-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index f2906f02e3..7f3034f724 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -188,7 +188,7 @@ function wp_list_authors($args = '') { $query = "SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"; $authors = $wpdb->get_results($query); - foreach ( $authors as $author ) { + foreach ( (array) $authors as $author ) { $author = get_userdata( $author->ID ); $posts = get_usernumposts($author->ID); $name = $author->nickname;