diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index afacfe0077..536dfb57a5 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -239,15 +239,12 @@ function get_site_by_path( $domain, $path, $segments = null ) { 'number' => 1, ); - if ( count( $domains ) > 1 && count( $paths ) > 1 ) { - $args['orderby'] = 'domain_length path_length'; - $args['order'] = 'DESC DESC'; - } elseif ( count( $domains ) > 1 ) { - $args['orderby'] = 'domain_length'; - $args['order'] = 'DESC'; - } elseif ( count( $paths ) > 1 ) { - $args['orderby'] = 'path_length'; - $args['order'] = 'DESC'; + if ( count( $domains ) > 1 ) { + $args['orderby']['domain_length'] = 'DESC'; + } + + if ( count( $paths ) > 1 ) { + $args['orderby']['path_length'] = 'DESC'; } $result = get_sites( $args ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0a90b08a90..20cb8ed97b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta1-37929'; +$wp_version = '4.6-beta1-37930'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.