#36847 closed defect (bug) (duplicate)
PHP Fatal error: Cannot use object of type Requests_Response as array
Reported by: | sebastian.pisula | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | HTTP API | Keywords: | |
Focuses: | Cc: |
Description
I try update plugin in WordPress and I have fatal:
[16-May-2016 06:39:46 UTC] PHP Fatal error: Cannot use object of type Requests_Response as array in \wordpress\wp-includes\http.php on line 255
Plugins was updated.
My WordPress version: 4.6-alpha-37434
Problem is in:
<?php /** * Retrieve only the response code from the raw response. * * Will return an empty array if incorrect parameter value is given. * * @since 2.7.0 * * @param array $response HTTP response. * @return int|string The response code as an integer. Empty string on incorrect parameter given. */ function wp_remote_retrieve_response_code( $response ) { if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) return ''; return $response['response']['code']; }
Change History (2)
Note: See
TracTickets for help on using
tickets.
Just fixed this in r37436. Can you update and try again please?