diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 8ae58299d6..2ed7a3d3f2 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 ) { + if ( false === strpos( $path, '://' ) ) { + // $path isn't a stream + return false; + } + $wrappers = stream_get_wrappers(); $wrappers = array_map( 'preg_quote', $wrappers ); $wrappers_re = '(' . join( '|', $wrappers ) . ')';