WordPress.org

Make WordPress Core

Ticket #27003: 27003.15.diff

File 27003.15.diff, 460 bytes (added by johnjamesjacoby, 6 years ago)

$networks is not keyed by column ID in wpmu_current_site()

  • wp-includes/ms-load.php

     
    250250                $networks = $wpdb->get_col( "SELECT id FROM $wpdb->site LIMIT 2" );
    251251
    252252                if ( count( $networks ) <= 1 ) {
    253                         $current_site = wp_get_network( $networks[0]->id );
     253                        $current_site = wp_get_network( $networks[0] );
    254254
    255255                        $current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id
    256256                                FROM $wpdb->blogs WHERE domain = %s AND path = %s",