Title: [Plugin: Geolocation] fatal error (another)
Last modified: August 19, 2016

---

# [Plugin: Geolocation] fatal error (another)

 *  [M66B](https://wordpress.org/support/users/m66b/)
 * (@m66b)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-geolocation-fatal-error-another/)
 * Fatal error: Cannot use object of type WP_Error as array in …/wp-content/plugins/
   geolocation/geolocation.php on line 509
 * [http://wordpress.org/extend/plugins/geolocation/](http://wordpress.org/extend/plugins/geolocation/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [M66B](https://wordpress.org/support/users/m66b/)
 * (@m66b)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-geolocation-fatal-error-another/#post-1738420)
 * 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);
       ```
   
 *  Thread Starter [M66B](https://wordpress.org/support/users/m66b/)
 * (@m66b)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-geolocation-fatal-error-another/#post-1738430)
 * In the above replace ‘error’ by ‘errors’.
 *  Thread Starter [M66B](https://wordpress.org/support/users/m66b/)
 * (@m66b)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-geolocation-fatal-error-another/#post-1738431)
 * Since the above is not working, I am trying this now:
 *     ```
       if (gettype($result) == 'WP_Error')
       	return print_r($result, true);
       ```
   
 *  Thread Starter [M66B](https://wordpress.org/support/users/m66b/)
 * (@m66b)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-geolocation-fatal-error-another/#post-1738432)
 * Still not fixed 🙁 maybe this works:
 *     ```
       if (is_wp_error($result))
       	return print_r($result, true);
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Geolocation] fatal error (another)’ is closed to new replies.

 * ![](https://ps.w.org/geolocation/assets/icon-256x256.png?rev=2871062)
 * [Geolocation](https://wordpress.org/plugins/geolocation/)
 * [Support Threads](https://wordpress.org/support/plugin/geolocation/)
 * [Active Topics](https://wordpress.org/support/plugin/geolocation/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geolocation/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geolocation/reviews/)

 * 4 replies
 * 1 participant
 * Last reply from: [M66B](https://wordpress.org/support/users/m66b/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-geolocation-fatal-error-another/#post-1738432)
 * Status: not resolved