Skip authors that no longer exist when doing an export. props nacin. fixes #16479

git-svn-id: http://svn.automattic.com/wordpress/trunk@17415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2011-02-07 19:58:41 +00:00
parent c7dee15b3c
commit 3dabc4a39e

View File

@ -241,6 +241,8 @@ function export_wp( $args = array() ) {
foreach ( (array) $results as $result )
$authors[] = get_userdata( $result->post_author );
$authors = array_filter( $authors );
foreach( $authors as $author ) {
echo "\t<wp:author>";
echo '<wp:author_id>' . $author->ID . '</wp:author_id>';