Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7627 closed defect (bug) (fixed)

Upgrade performed with empty database creates database

Reported by: pishmishy's profile pishmishy Owned by: pishmishy's profile 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 16 years ago.
use is_blog_installed()

Download all attachments as: .zip

Change History (5)

#1 @pishmishy
16 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.

#2 @DD32
16 years ago

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

@pishmishy
16 years ago

use is_blog_installed()

#3 @pishmishy
16 years ago

So it is! New patch attached.

#4 @westi
16 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.