From d1586725d1cf52dc70d00d008d84b347fd55c323 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 9 Jun 2015 17:59:24 +0000 Subject: [PATCH] Add error if a user attempts to install WordPress with DO_NOT_UPGRADE_GLOBAL_TABLES defined The install process runs through migrations to global tables, therefore we cannot install WordPress with this constant defined. This error message prevents a false success screen from being seen. Fixes #32011. Props Oxymoron. Built from https://develop.svn.wordpress.org/trunk@32714 git-svn-id: http://core.svn.wordpress.org/trunk@32684 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index 8d7e947a8f..6858661662 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -193,6 +193,12 @@ if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { die( '

' . __( 'Configuration Error' ) . '

' . __( 'Your wp-config.php file has an empty database table prefix, which is not supported.' ) . '

' ); } +// Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install. +if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && true === DO_NOT_UPGRADE_GLOBAL_TABLES ) { + display_header(); + die( '

' . __( 'Configuration Error' ) . '

' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when installing WordPress.' ) . '

' ); +} + /** * @global string $wp_local_package * @global WP_Locale $wp_locale diff --git a/wp-includes/version.php b/wp-includes/version.php index 533fdb63ff..1cc015e57d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32713'; +$wp_version = '4.3-alpha-32714'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.