WordPress.org

Make WordPress Core

Ticket #33909: 33909.diff

File 33909.diff, 616 bytes (added by kraftbj, 4 years ago)

Add check for home constant in populate_options().

  • src/wp-admin/includes/schema.php

     
    344344function populate_options() {
    345345        global $wpdb, $wp_db_version, $wp_current_db_version;
    346346
    347         $guessurl = wp_guess_url();
     347        $guessurl = $homeurl = wp_guess_url();
     348        if ( defined( 'WP_HOME' ) && ! empty( WP_HOME ) ) { // wp_guess_url() checked WP_SITEURL constant.
     349                $homeurl = WP_HOME;
     350        }
    348351        /**
    349352         * Fires before creating WordPress options and populating their default values.
    350353         *