WordPress.org

Make WordPress Core

Ticket #35560: 35560.2.diff

File 35560.2.diff, 597 bytes (added by SergeyBiryukov, 15 months ago)
  • src/wp-includes/load.php

     
    418418                return;
    419419        }
    420420
    421         $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
     421        $dbuser     = defined( 'DB_USER' ) ? DB_USER : null;
     422        $dbpassword = defined( 'DB_PASSWORD' ) ? DB_PASSWORD : null;
     423        $dbname     = defined( 'DB_NAME' ) ? DB_NAME : null;
     424        $dbhost     = defined( 'DB_HOST' ) ? DB_HOST : null;
     425
     426        $wpdb = new wpdb( $dbuser, $dbpassword, $dbname, $dbhost );
    422427}
    423428
    424429/**