Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5468 closed defect (bug) (fixed)

WXR import error when no tags are used

Reported by: fitztrev's profile 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)

fitztrev.diff (365 bytes) - added by fitztrev 17 years ago.

Download all attachments as: .zip

Change History (4)

#1 @fitztrev
17 years ago

  • 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.

#2 @fitztrev
17 years ago

  • Keywords has-patch added

@fitztrev
17 years ago

#3 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.