Opened 17 years ago
Closed 17 years ago
#5468 closed defect (bug) (fixed)
WXR import error when no tags are used
Reported by: | fitztrev | Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
When importing a WP Export file, the following error occurs:
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/fitztrev/public_html/trunk/wp-admin/import/wordpress.php on line 238
This was tested between 2 trunk installations, both revision 6381.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
This occurs because the 'tags' variable is only casted into an array once a tag has been found. If the blog owner has never used tags before, this causes a problem. This patch initializes the 'tags' variable as an array at the beginning of the import class.
To recreate:
1) Have 2 fresh installations side by side.
2) Export content from 1 WP instance from Manage>Export
3) Import that file on the second WP instance from Manage>Import>WordPress
*) Then try again, but give Hello World a tag.