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
|
b
|
function _device_can_upload() { |
5553 | 5553 | * @return bool True if the path is a stream URL. |
5554 | 5554 | */ |
5555 | 5555 | function wp_is_stream( $path ) { |
| 5556 | if ( false === strpos( $path, '://' ) ) { |
| 5557 | // can't possibly be a stream |
| 5558 | return false; |
| 5559 | } |
| 5560 | |
5556 | 5561 | $wrappers = stream_get_wrappers(); |
5557 | 5562 | $wrappers = array_map( 'preg_quote', $wrappers ); |
5558 | 5563 | $wrappers_re = '(' . join( '|', $wrappers ) . ')'; |