From 7f8a90d238400e98e6f34dd32969423283e1de26 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Fri, 13 Jul 2018 07:34:55 -0600
Subject: [PATCH] implements @dd32's suggestion in
 https://core.trac.wordpress.org/ticket/44532#comment:27

---
 wp-includes/functions.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 8ae5829..3330573 100644
--- a/wp-includes/functions.php
+++ b/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 ) {
+	if ( 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 ) . ')';
-- 
2.7.0.windows.1

