Make WordPress Core

Opened 20 years ago

Closed 20 years ago

#2675 closed defect (bug) (fixed)

Error when upgrading with no links/bookmarks

Reported by: ryanscheuermann's profile ryanscheuermann Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords: links, upgrade
Focuses: Cc:

Description

When upgrading using the latest trunk code, I get this error because I have no links in my current DB:

Warning: Invalid argument supplied for foreach() in wp-admin\upgrade-functions.php on line 525

It does a foreach without checking if $links is null:

		$links = $wpdb->get_results("SELECT link_id, link_category FROM $wpdb->links");
		foreach ( $links as $link ) {

Change History (1)

#1 @ryan
20 years ago

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

(In [3734]) Make sure we have links to iterate over. fixes #2675

Note: See TracTickets for help on using tickets.