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/theme.php

    r17633 r17928  
    397397            $res = new WP_Error('themes_api_failed', __('An Unexpected HTTP Error occurred during the API request.'), $request->get_error_message() );
    398398        } else {
    399             $res = unserialize($request['body']);
     399            $res = unserialize( wp_remote_retrieve_body( $request ) );
    400400            if ( ! $res )
    401             $res = new WP_Error('themes_api_failed', __('An unknown error occurred.'), $request['body']);
     401            $res = new WP_Error('themes_api_failed', __('An unknown error occurred.'), wp_remote_retrieve_body( $request ) );
    402402        }
    403403    }
Note: See TracChangeset for help on using the changeset viewer.