Ticket #7627 (closed defect (bug): fixed)

Opened 4 months ago

Last modified 4 months ago

Upgrade performed with empty database creates database

Reported by: pishmishy Assigned to: pishmishy
Priority: high Milestone: 2.7
Component: General Version: 2.6.1
Severity: major Keywords: install upgrade database has_patch
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

7627.patch (1.0 kB) - added by pishmishy on 08/28/08 13:53:59.
use is_blog_installed()

Change History

08/28/08 13:14:31 changed by pishmishy

  • keywords changed from install upgrade database to install upgrade database has_patch.
  • 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.

08/28/08 13:47:00 changed by DD32

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

08/28/08 13:53:59 changed by pishmishy

  • attachment 7627.patch added.

use is_blog_installed()

08/28/08 13:54:16 changed by pishmishy

So it is! New patch attached.

08/28/08 20:55:41 changed by westi

  • status changed from assigned to closed.
  • resolution set to fixed.

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