WordPress.org

Make WordPress Core

Ticket #12459: 12459.diff

File 12459.diff, 791 bytes (added by Denis-de-Bernardy, 5 years ago)
  • wp-includes/ms-functions.php

     
    5050 
    5151        $blogs = $match = array(); 
    5252        foreach ( (array) $user as $key => $value ) { 
    53                 if ( false !== strpos( $key, '_capabilities') && 0 === strpos( $key, $wpdb->base_prefix ) && preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) { 
     53                if ( $wpdb->base_prefix === '' && $key == 'capabilities' || 
     54                        false !== strpos( $key, '_capabilities') && 0 === strpos( $key, $wpdb->base_prefix ) && 
     55                        preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) { 
    5456                        if ( count( $match ) > 2 ) 
    5557                                $blog_id = $match[ 2 ]; 
    5658                        else