WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#7627 closed defect (bug) (fixed)

Upgrade performed with empty database creates database

Reported by: pishmishy Owned by: pishmishy
Milestone: 2.7 Priority: high
Severity: major Version: 2.6.1
Component: General Keywords: install upgrade database has_patch
Focuses: Cc:

Description

An upgrade process performed before the user has initialized the WordPress install causes database tables to be created. This then prevents the user from running the setup process, locking them out. To reproduce:

  1. Install WordPress but don't run through the installation pages at http://foo.com/wp-admin/install.php
  2. Run the upgrade process at http://foo.com/wp-admin/upgrade.php
  3. Database tables have been created, preventing the install process from running, the user table is empty.

Attachments (1)

7627.patch (981 bytes) - added by pishmishy 6 years ago.
use is_blog_installed()

Download all attachments as: .zip

Change History (5)

comment:1 pishmishy6 years ago

  • Keywords has_patch added
  • Status changed from new to assigned

Attached patch won't allow an upgrade if get_option('db_version') is undefined. I am of course, presuming that this is a useful way of detecting an empty database.

comment:2 DD326 years ago

is_blog_installed() - /wp-includes/functions.php sounds like it'd be the function call you'd be after.

pishmishy6 years ago

use is_blog_installed()

comment:3 pishmishy6 years ago

So it is! New patch attached.

comment:4 westi6 years ago

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

(In [8763]) Only upgrade if we are installed. Fixes #7627 props pishmishy.

Note: See TracTickets for help on using tickets.