Opened 7 years ago
Closed 7 years ago
#2675 closed defect (bug) (fixed)
Error when upgrading with no links/bookmarks
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | General | Version: | 2.1 |
| Severity: | normal | Keywords: | links, upgrade |
| 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)
Note: See
TracTickets for help on using
tickets.

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