Make WordPress Core

Ticket #44532: 44532.1.diff

File 44532.1.diff, 916 bytes (added by pbiron, 6 years ago)

implements @dd32's suggestion in https://core.trac.wordpress.org/ticket/44532#comment:27

  • wp-includes/functions.php

    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() { 
    55535553 * @return bool True if the path is a stream URL.
    55545554 */
    55555555function wp_is_stream( $path ) {
     5556        if ( false === strpos( $path, '://' ) ) {
     5557                // can't possibly be a stream
     5558                return false;
     5559        }
     5560
    55565561        $wrappers    = stream_get_wrappers();
    55575562        $wrappers    = array_map( 'preg_quote', $wrappers );
    55585563        $wrappers_re = '(' . join( '|', $wrappers ) . ')';