WordPress.org

Make WordPress Core

Ticket #22900: 22900.2.diff

File 22900.2.diff, 721 bytes (added by nacin, 16 months ago)

Something less invasive for 3.5.1.

  • wp-includes/class-http.php

     
    141141                // Force some settings if we are streaming to a file and check for existence and perms of destination directory 
    142142                if ( $r['stream'] ) { 
    143143                        $r['blocking'] = true; 
    144                         if ( ! is_writable( dirname( $r['filename'] ) ) ) 
     144                        if ( ! call_user_func( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ? 'win_is_writable' : 'is_writable', dirname( $r['filename'] ) ) ) 
    145145                                return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) ); 
    146146                } 
    147147