diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 8ae58299d6..a201b40d02 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -5553,6 +5553,11 @@ function _device_can_upload() {
  * @return bool True if the path is a stream URL.
  */
 function wp_is_stream( $path ) {
+	$path = wp_normalize_path( $path );
+	if ( false !== strpos( $path, 'file://' ) || false === strpos( $path, '://' ) ) {
+		// can't possibly be a stream
+		return false;
+	}
 	$wrappers    = stream_get_wrappers();
 	$wrappers    = array_map( 'preg_quote', $wrappers );
 	$wrappers_re = '(' . join( '|', $wrappers ) . ')';
