WordPress.org

Ready to get started?Download WordPress

Forums

Geolocation
fatal error (another) (5 posts)

  1. Marcel Bokhorst
    Member
    Posted 3 years ago #

    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/

  2. Marcel Bokhorst
    Member
    Posted 3 years ago #

    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);
  3. Marcel Bokhorst
    Member
    Posted 3 years ago #

    In the above replace 'error' by 'errors'.

  4. Marcel Bokhorst
    Member
    Posted 3 years ago #

    Since the above is not working, I am trying this now:

    if (gettype($result) == 'WP_Error')
    	return print_r($result, true);
  5. Marcel Bokhorst
    Member
    Posted 3 years ago #

    Still not fixed :( maybe this works:

    if (is_wp_error($result))
    	return print_r($result, true);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic