WordPress.org

Make WordPress Core

Ticket #44533: 44533.patch

File 44533.patch, 653 bytes (added by JPry, 2 years ago)
  • src/wp-includes/functions.php

    diff --git src/wp-includes/functions.php src/wp-includes/functions.php
    index 8ae58299d6..0dec6df4f5 100644
    function _device_can_upload() { 
    55535553 * @return bool True if the path is a stream URL.
    55545554 */
    55555555function 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
    55585561        $wrappers_re = '(' . join( '|', $wrappers ) . ')';
    55595562
    55605563        return preg_match( "!^$wrappers_re://!", $path ) === 1;