Make WordPress Core

Changeset 21924


Ignore:
Timestamp:
09/20/2012 01:39:46 PM (12 years ago)
Author:
ryan
Message:

Suppress db errors when checking if the blog is already installed in install_blog(). Use DESCRIBE instead of SELECT. Props bpetty. fixes #21922

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r21860 r21924  
    11281128    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    11291129
    1130     if ( $wpdb->get_results("SELECT ID FROM $wpdb->posts") )
     1130    $wpdb->suppress_errors();
     1131    if ( $wpdb->get_results( "DESCRIBE {$wpdb->posts}" ) )
    11311132        die( __( '<h1>Already Installed</h1><p>You appear to have already installed WordPress. To reinstall please clear your old database tables first.</p>' ) . '</body></html>' );
     1133    $wpdb->suppress_errors( false );
    11321134
    11331135    $url = get_blogaddress_by_id( $blog_id );
Note: See TracChangeset for help on using the changeset viewer.