mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 07:07:38 +02:00
Handle empty authors list. Props MichaelH. fixes #2384
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d0cc33e98e
commit
4411066167
@ -183,7 +183,7 @@ function list_authors($optioncount = false, $exclude_admin = true, $show_fullnam
|
||||
$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;
|
||||
@ -235,4 +235,4 @@ function list_authors($optioncount = false, $exclude_admin = true, $show_fullnam
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user