WP Geo
[PATCH] Undefined offset error (2 posts)

  1. flynsarmy
    Posted 2 years ago #

    If you create a new post with WP_DEBUG turned on and don't enter any map info, just post info, you get the following warning:

    Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/work/qpsmedia/regionblogs/wp-content/plugins/wp-geo/includes/wp-geo.php on line 666

    The line in question is

    if ( wpgeo_is_valid_geo_coord( $new_mapcentre[0], $new_mapcentre[1] ) ) {

    Simply change it to

    if ( isset($new_mapcentre[0]) && isset($new_mapcentre[1]) && wpgeo_is_valid_geo_coord( $new_mapcentre[0], $new_mapcentre[1] ) ) {


  2. Ben Huson
    Plugin Author

    Posted 2 years ago #

    Thanks - is that in the current latest version of the plugin?

    I'm working on a complete overhaul of the plugin to support Google Maps v3 as Google Maps v2 will cease to work very soon.

    I would very much appreciate it if you are able to test the development version which you can download here. Any feedback would be gratefully received.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Geo
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.