#36847 closed defect (bug) (duplicate)
PHP Fatal error: Cannot use object of type Requests_Response as array
| Reported by: | sebastian.pisula | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | HTTP API | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Just fixed this in r37436. Can you update and try again please?