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/plugin-install.php

    r16469 r17928  
    4646            $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.'), $request->get_error_message() );
    4747        } else {
    48             $res = unserialize($request['body']);
     48            $res = unserialize( wp_remote_retrieve_body( $request ) );
    4949            if ( false === $res )
    50                 $res = new WP_Error('plugins_api_failed', __('An unknown error occurred.'), $request['body']);
     50                $res = new WP_Error('plugins_api_failed', __('An unknown error occurred.'), wp_remote_retrieve_body( $request ) );
    5151        }
    5252    } elseif ( !is_wp_error($res) ) {
     
    368368}
    369369add_action('install_plugins_pre_plugin-information', 'install_plugin_information');
    370 
Note: See TracChangeset for help on using the changeset viewer.