Fatal error: Cannot use object of type WP_Error as array in .../wp-content/plugins/geolocation/geolocation.php on line 509
Fatal error: Cannot use object of type WP_Error as array in .../wp-content/plugins/geolocation/geolocation.php on line 509
Since $result contained:
WP_Error Object ( [errors] => Array ( [http_request_failed] => Array ( [0] => Connection time-out ) ) [error_data] => Array ( ) )
I've inserted at line 509:
if (isset($result['error']))
return print_r($result, true);In the above replace 'error' by 'errors'.
Since the above is not working, I am trying this now:
if (gettype($result) == 'WP_Error')
return print_r($result, true);Still not fixed :( maybe this works:
if (is_wp_error($result))
return print_r($result, true);This topic has been closed to new replies.