Make WordPress Core

Changeset 32714


Ignore:
Timestamp:
06/09/2015 05:58:18 PM (9 years ago)
Author:
jorbin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r32654 r32714  
    192192    display_header();
    193193    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>' );
     194}
     195
     196// Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install.
     197if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && true === DO_NOT_UPGRADE_GLOBAL_TABLES ) {
     198    display_header();
     199    die( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when installing WordPress.' ) . '</p></body></html>' );
    194200}
    195201
Note: See TracChangeset for help on using the changeset viewer.