~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/setup-config.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 */
29
29
error_reporting(0);
30
30
 
31
 
define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
 
31
if ( ! defined( 'ABSPATH' ) ) {
 
32
        define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
 
33
}
32
34
 
33
35
require( ABSPATH . 'wp-settings.php' );
34
36
 
276
278
        if ( ! empty( $wpdb->error ) )
277
279
                wp_die( $wpdb->error->get_error_message() . $tryagain_link );
278
280
 
 
281
        $wpdb->query( "SELECT $prefix" );
 
282
        if ( ! $wpdb->last_error ) {
 
283
                // MySQL was able to parse the prefix as a value, which we don't want. Bail.
 
284
                wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) );
 
285
        }
 
286
 
279
287
        // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password().
280
288
        try {
281
289
                $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|';