Fatal error: Cannot use object of type WP_Error as array
-
I’m getting this error:
Fatal error: Cannot use object of type WP_Error as array in /srv/www/wordpress-themereview-vvv/htdocs/wp-content/plugins/theme-checklist/theme-checklist.php on line 97
That’s this line:
if( is_wp_error($request) && isset($request['response']['code']) && $request['response']['code'] == 200 ) {
Using var_dump to look into $request produces:
object(WP_Error)#349 (2) { [“errors”]=> array(1) { [“http_request_failed”]=> array(1) { [0]=> string(42) “Could not resolve host: themechecklist.org” } } [“error_data”]=> array(0) { } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fatal error: Cannot use object of type WP_Error as array’ is closed to new replies.