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
This commit is contained in:
Aaron Jorbin 2015-06-09 17:59:24 +00:00
parent 5dfd6a02a7
commit d1586725d1
2 changed files with 7 additions and 1 deletions

View File

@ -193,6 +193,12 @@ if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) {
die( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'Your <code>wp-config.php</code> file has an empty database table prefix, which is not supported.' ) . '</p></body></html>' );
}
// 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( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when installing WordPress.' ) . '</p></body></html>' );
}
/**
* @global string $wp_local_package
* @global WP_Locale $wp_locale

View File

@ -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.