Ticket #5468 (closed defect: fixed)

Opened 1 year ago

Last modified 11 months ago

WXR import error when no tags are used

Reported by: fitztrev Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords: has-patch
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

fitztrev.diff (365 bytes) - added by fitztrev on 01/06/08 07:28:04.

Change History

01/06/08 07:25:08 changed by fitztrev

  • summary changed from array_shift() Error on WXR Import to WXR import error when no tags are used.

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.

01/06/08 07:26:15 changed by fitztrev

  • keywords set to has-patch.

01/06/08 07:28:04 changed by fitztrev

  • attachment fitztrev.diff added.

01/06/08 08:43:20 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6565]) Init tags array. Props fitzrev. fixes #5468