Skip authors that no longer exist when doing an export. props nacin. fixes #16479
git-svn-id: https://develop.svn.wordpress.org/trunk@17415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e3c732da0c
commit
a701db272d
@ -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>';
|
||||
|
Loading…
Reference in New Issue
Block a user