Opened 20 years ago
Closed 20 years ago
#2675 closed defect (bug) (fixed)
Error when upgrading with no links/bookmarks
| Reported by: |
|
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 ) {
Note: See
TracTickets for help on using
tickets.
(In [3734]) Make sure we have links to iterate over. fixes #2675