diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index 8ae58299d6..0dec6df4f5 100644
|
|
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 | | $wrappers = stream_get_wrappers(); |
5557 | | $wrappers = array_map( 'preg_quote', $wrappers ); |
| 5556 | $wrappers = stream_get_wrappers(); |
| 5557 | foreach ( $wrappers as &$wrapper ) { |
| 5558 | $wrapper = preg_quote( $wrapper, '!' ); |
| 5559 | } |
| 5560 | |
5558 | 5561 | $wrappers_re = '(' . join( '|', $wrappers ) . ')'; |
5559 | 5562 | |
5560 | 5563 | return preg_match( "!^$wrappers_re://!", $path ) === 1; |