WordPress.org

Make WordPress Core

Ticket #8947: patch.diff

File patch.diff, 820 bytes (added by joostdevalk, 9 years ago)

Patch

  • wp-includes/functions.php

     
    16801680                return true;
    16811681
    16821682        $suppress = $wpdb->suppress_errors();
    1683         $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
     1683        $alloptions = wp_load_alloptions();
     1684        // If siteurl is not set to autoload, but other options are loaded, check if it's there
     1685        if ( !isset($alloptions['siteurl']) && count($alloptions) > 1 )
     1686                $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
     1687        else
     1688                $installed = $alloptions['siteurl'];
    16841689        $wpdb->suppress_errors($suppress);
    16851690
    16861691        $installed = !empty( $installed ) ? true : false;