Make WordPress Core


Ignore:
Timestamp:
05/14/2011 07:45:07 PM (13 years ago)
Author:
nacin
Message:

Use wp_remote_retrieve_* helper functions instead of the raw HTTP response array. props aaroncampbell, fixes #17416.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r17749 r17928  
    491491    }
    492492
    493     if ( $response['response']['code'] != '200' ){
     493    if ( 200 != wp_remote_retrieve_response_code( $response ) ){
    494494        unlink( $tmpfname );
    495         return new WP_Error( 'http_404', trim( $response['response']['message'] ) );
     495        return new WP_Error( 'http_404', trim( wp_remote_retrieve_response_message( $response ) ) );
    496496    }
    497497
Note: See TracChangeset for help on using the changeset viewer.