#16479 closed defect (bug) (fixed)
Export xml file errors
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Export | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Recieving an error such as this with the generated xml file:
<wp:author><br /> <b>Notice</b>: Trying to get property of non-object in <b>E:\htdocs\wpbeta\wp-admin\includes\export.php</b> on line <b>246</b><br /> <wp:author_id></wp:author_id><br /> <b>Notice</b>: Trying to get property of non-object in <b>E:\htdocs\wpbeta\wp-admin\includes\export.php</b> on line <b>247</b><br /> <wp:author_login></wp:author_login><br /> <b>Notice</b>: Trying to get property of non-object in <b>E:\htdocs\wpbeta\wp-admin\includes\export.php</b> on line <b>248</b><br /> <wp:author_email></wp:author_email><br /> <b>Notice</b>: Trying to get property of non-object in <b>E:\htdocs\wpbeta\wp-admin\includes\export.php</b> on line <b>249</b><br /> <wp:author_display_name><![CDATA[]]></wp:author_display_name><br /> <b>Notice</b>: Trying to get property of non-object in <b>E:\htdocs\wpbeta\wp-admin\includes\export.php</b> on line <b>250</b><br /> <wp:author_first_name><![CDATA[]]></wp:author_first_name><br /> <b>Notice</b>: Trying to get property of non-object in <b>E:\htdocs\wpbeta\wp-admin\includes\export.php</b> on line <b>251</b><br /> <wp:author_last_name><![CDATA[]]></wp:author_last_name></wp:author>
I thought this may have been caused by users created via a plugin - but after having deleted those, this error is still appearing.
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
This can happen when get_userdata() returns false, such as when a post's author no longer exists. It's not supposed to happen, but it's definitely possible. We should run an array_filter() on $authors before entering the foreach loop.