Index: src/wp-includes/ms-load.php
===================================================================
--- src/wp-includes/ms-load.php	(revision 37658)
+++ src/wp-includes/ms-load.php	(working copy)
@@ -161,7 +161,7 @@
  * @param string   $domain   Domain to check.
  * @param string   $path     Path to check.
  * @param int|null $segments Path segments to use. Defaults to null, or the full path.
- * @return object|false Site object if successful. False when no site is found.
+ * @return WP_Site|false Site object if successful. False when no site is found.
  */
 function get_site_by_path( $domain, $path, $segments = null ) {
 	$path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );
@@ -204,15 +204,18 @@
 	 *
 	 * @since 3.9.0
 	 *
-	 * @param null|bool|object $site     Site value to return by path.
-	 * @param string           $domain   The requested domain.
-	 * @param string           $path     The requested path, in full.
-	 * @param int|null         $segments The suggested number of paths to consult.
-	 *                                   Default null, meaning the entire path was to be consulted.
-	 * @param array            $paths    The paths to search for, based on $path and $segments.
+	 * @param null|bool|WP_Site $site     Site value to return by path.
+	 * @param string            $domain   The requested domain.
+	 * @param string            $path     The requested path, in full.
+	 * @param int|null          $segments The suggested number of paths to consult.
+	 *                                    Default null, meaning the entire path was to be consulted.
+	 * @param array             $paths    The paths to search for, based on $path and $segments.
 	 */
 	$pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
 	if ( null !== $pre ) {
+		if ( false !== $pre && ! $pre instanceof WP_Site ) {
+			$pre = new WP_Site( $pre );
+		}
 		return $pre;
 	}
 
